\input{preamble}

% OK, start here.
%
\begin{document}

\title{Artin's Axioms}

\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents




\section{Introduction}
\label{section-introduction}

\noindent
In this chapter we discuss Artin's axioms for the representability of
functors by algebraic spaces. As references we suggest the papers
\cite{ArtinI}, \cite{ArtinII}, \cite{ArtinVersal}.

\medskip\noindent
Some of the notation, conventions, and terminology in this chapter is awkward
and may seem backwards to the more experienced reader. This is intentional.
Please see Quot, Section \ref{quot-section-conventions} for an
explanation.

\medskip\noindent
Let $S$ be a locally Noetherian base scheme. Let
$$
p : \mathcal{X} \longrightarrow (\Sch/S)_{fppf}
$$
be a category fibred in groupoids. Let $x_0$ be an object of $\mathcal{X}$
over a field $k$ of finite type over $S$. Throughout this chapter an important
role is played by the predeformation category
(see Formal Deformation Theory,
Definition \ref{formal-defos-definition-predeformation-category})
$$
\mathcal{F}_{\mathcal{X}, k, x_0}
\longrightarrow
\{\text{Artinian local }S\text{-algebras with residue field }k\}
$$
associated to $x_0$ over $k$. We introduce the Rim-Schlessinger condition (RS)
for $\mathcal{X}$ and show it guarantees that
$\mathcal{F}_{\mathcal{X}, k, x_0}$ is a deformation category, i.e.,
$\mathcal{F}_{\mathcal{X}, k, x_0}$ satisfies (RS) itself.
We discuss how $\mathcal{F}_{\mathcal{X}, k, x_0}$
changes if one replaces $k$ by a finite extension
and we discuss tangent spaces.

\medskip\noindent
Next, we discuss formal objects $\xi = (\xi_n)$ of $\mathcal{X}$ which are
inverse systems of objects lying over the quotients $R/\mathfrak m^n$
where $R$ is a Noetherian complete local $S$-algebra whose residue field
is of finite type over $S$. This is the same thing as having a formal
object in $\mathcal{F}_{\mathcal{X}, k, x_0}$ for some $x_0$ and $k$.
A formal object is called effective when there is an object of
$\mathcal{X}$ over $R$ which gives rise to the inverse system.
A formal object of $\mathcal{X}$ is called versal if it gives rise to a
versal formal object of $\mathcal{F}_{\mathcal{X}, k, x_0}$.
Finally, given a finite type $S$-scheme $U$, an object $x$
of $\mathcal{X}$ over $U$, and a closed point $u_0 \in U$ we say
$x$ is versal at $u_0$ if the induced formal object over the complete
local ring $\mathcal{O}_{U, u_0}^\wedge$ is versal.

\medskip\noindent
Having worked through this material we can state Artin's celebrated
theorem: our $\mathcal{X}$ is an algebraic stack if the following are true
\begin{enumerate}
\item $\mathcal{O}_{S, s}$ is a G-ring for all $s \in S$,
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is representable by algebraic spaces,
\item $\mathcal{X}$ is a stack for the \'etale topology,
\item $\mathcal{X}$ is limit preserving,
\item $\mathcal{X}$ satisfies (RS),
\item tangent spaces and spaces of infinitesimal automorphisms
of the deformation categories $\mathcal{F}_{\mathcal{X}, k, x_0}$
are finite dimensional,
\item formal objects are effective,
\item $\mathcal{X}$ satisfies openness of versality.
\end{enumerate}
This is Lemma \ref{lemma-diagonal-representable}; see also
Proposition \ref{proposition-second-diagonal-representable}
for a slight improvement. There is an analogous proposition
characterizing which functors $F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$
are algebraic spaces, see Section \ref{section-algebraic-spaces}.

\medskip\noindent
Here is a rough outline of the proof of Artin's theorem.
First we show that there are plenty of versal formal objects
using (RS) and the finite dimensionality of tangent and aut spaces, see
for example Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-minimal-groupoid-in-functors-construction}.
These formal objects are effective by assumption.
Effective formal objects can be ``approximated'' by objects $x$ over
finite type $S$-schemes $U$, see Lemma \ref{lemma-approximate}.
This approximation uses the local rings of $S$ are G-rings and
that $\mathcal{X}$ is limit preserving; it is perhaps the most difficult
part of the proof relying as it does on general N\'eron desingularization to
approximate formal solutions of algebraic equations over a Noetherian local
G-ring by solutions in the henselization.
Next openness of versality implies we may (after shrinking $U$)
assume $x$ is versal at every closed point of $U$.
Having done all of this we show that $U \to \mathcal{X}$
is a smooth morphism. Taking sufficiently many $U \to \mathcal{X}$
we show that we obtain a ``smooth atlas'' for $\mathcal{X}$ which shows
that $\mathcal{X}$ is an algebraic stack.

\medskip\noindent
In checking Artin's axioms for a given category $\mathcal{X}$ fibred
in groupoids, the most difficult step is often to verify openness
of versality. For the discussion that follows, assume that $\mathcal{X}/S$
already satisfies the other conditions listed above.
In this chapter we offer two methods that will allow the reader
to prove $\mathcal{X}$ satisfies openness of versality:
\begin{enumerate}
\item The first is to assume a stronger Rim-Schlessinger
condition, called (RS*) and to assume a stronger version of
formal effectiveness, essentially requiring objects over
inverse systems of thickenings to be effective. It turns out
that under these assumptions, openness of versality comes for
free, see Lemma \ref{lemma-SGE-implies-openness-versality}.
Please observe that here we are using in an essential manner
that $\mathcal{X}$ is defined on that category of all schemes
over $S$, not just the category of Noetherian schemes!
\item The second, following Artin, is to require $\mathcal{X}$
to come equipped with an obstruction theory. If said obstruction
theory ``commutes with products'' in a suitable sense, then
$\mathcal{X}$ satisfies openness of versality, see
Lemma \ref{lemma-get-openness-obstruction-theory}.
\end{enumerate}
Obstruction theories can be axiomatized in many different ways
and indeed many variants (often adapted to specific moduli stacks)
can be found in the literature. We explain a variant using the derived category
(which often arises naturally from deformation theory computations
done in the literature) in Lemma \ref{lemma-dual-openness}.

\medskip\noindent
In Section \ref{section-algebraic-spaces-noetherian}
we discuss what needs to be modified to make
things work for functors defined on the category
$(\textit{Noetherian}/S)_\etale$ of locally Noetherian
schemes over $S$.

\medskip\noindent
In the final section of this chapter as an application of Artin's axioms
we prove Artin's theorem on the existence of contractions, see
Section \ref{section-contractions}. The theorem says roughly that given an
algebraic space $X'$ separated of finite type over $S$,
a closed subset $T' \subset |X'|$, and a formal modification
$$
\mathfrak{f} : X'_{/T'} \longrightarrow \mathfrak{X}
$$
where $\mathfrak{X}$ is a Noetherian formal algebraic space over $S$,
there exists a proper morphism $f : X' \to X$ which
``realizes the contraction''. By this we mean that there exists an
identification $\mathfrak{X} = X_{/T}$ such that
$\mathfrak{f} = f_{/T'} : X'_{/T'} \to X_{/T}$ where $T = f(T')$
and moreover $f$ is an isomorphism over $X \setminus T$. The proof proceeds
by defining a functor $F$ on the category of locally Noetherian schemes
over $S$ and proving Artin's axioms for $F$. Amusingly, in this
application of Artin's axioms, openness of versality is not the hardest
thing to prove, instead the proof that $F$ is limit preserving requires
a lot of work and preliminary results.




\section{Conventions}
\label{section-conventions}

\noindent
The conventions we use in this chapter are the same as those in the
chapter on algebraic stacks, see
Algebraic Stacks, Section \ref{algebraic-section-conventions}.
In this chapter the base scheme $S$ will often be locally Noetherian
(although we will always reiterate this condition when stating
results).





\section{Predeformation categories}
\label{section-predeformation-categories}

\noindent
Let $S$ be a locally Noetherian base scheme. Let
$$
p : \mathcal{X} \longrightarrow (\Sch/S)_{fppf}
$$
be a category fibred in groupoids. Let $k$ be a field
and let $\Spec(k) \to S$ be a morphism of finite type (see
Morphisms, Lemma \ref{morphisms-lemma-point-finite-type}). We will sometimes
simply say that {\it $k$ is a field of finite type over $S$}. Let
$x_0$ be an object of $\mathcal{X}$ lying over $\Spec(k)$.
Given $S$, $\mathcal{X}$, $k$, and $x_0$ we will construct a
predeformation category, as defined in
Formal Deformation Theory,
Definition \ref{formal-defos-definition-predeformation-category}.
The construction will resemble the construction of
Formal Deformation Theory,
Remark \ref{formal-defos-remark-localize-cofibered-groupoid}.

\medskip\noindent
First, by Morphisms, Lemma \ref{morphisms-lemma-point-finite-type}
we may pick an affine open $\Spec(\Lambda) \subset S$ such that
$\Spec(k) \to S$ factors through $\Spec(\Lambda)$ and the associated
ring map $\Lambda \to k$ is finite. This provides us with the category
$\mathcal{C}_\Lambda$, see
Formal Deformation Theory, Definition \ref{formal-defos-definition-CLambda}.
The category $\mathcal{C}_\Lambda$, up to canonical equivalence,
does not depend on the choice of the affine open $\Spec(\Lambda)$ of $S$.
Namely, $\mathcal{C}_\Lambda$ is equivalent to the opposite
of the category of factorizations
\begin{equation}
\label{equation-factor}
\Spec(k) \to \Spec(A) \to S
\end{equation}
of the structure morphism such that $A$ is an Artinian local ring and
such that $\Spec(k) \to \Spec(A)$ corresponds to a ring map $A \to k$ which
identifies $k$ with the residue field of $A$.

\medskip\noindent
We let $\mathcal{F} = \mathcal{F}_{\mathcal{X}, k, x_0}$ be the
category whose
\begin{enumerate}
\item objects are morphisms $x_0 \to x$ of $\mathcal{X}$ where
$p(x) = \Spec(A)$ with $A$ an Artinian local ring and
$p(x_0) \to p(x) \to S$ a factorization as in (\ref{equation-factor}), and
\item morphisms $(x_0 \to x) \to (x_0 \to x')$ are commutative
diagrams
$$
\xymatrix{
x & & x' \ar[ll] \\
& x_0 \ar[lu] \ar[ru]
}
$$
in $\mathcal{X}$. (Note the reversal of arrows.)
\end{enumerate}
If $x_0 \to x$ is an object of $\mathcal{F}$ then writing $p(x) = \Spec(A)$
we obtain an object $A$ of $\mathcal{C}_\Lambda$. We often say that
$x_0 \to x$ or $x$ lies over $A$. A morphism of $\mathcal{F}$ between objects
$x_0 \to x$ lying over $A$ and $x_0 \to x'$ lying over $A'$
corresponds to a morphism $x' \to x$ of $\mathcal{X}$, hence a morphism
$p(x' \to x) : \Spec(A') \to \Spec(A)$ which in turn corresponds to a
ring map $A \to A'$. As $\mathcal{X}$ is a category
over the category of schemes over $S$ we see that $A \to A'$ is
$\Lambda$-algebra homomorphism. Thus we obtain a functor
\begin{equation}
\label{equation-predeformation-category}
p : \mathcal{F} = \mathcal{F}_{\mathcal{X}, k, x_0}
\longrightarrow
\mathcal{C}_\Lambda.
\end{equation}
We will use the notation $\mathcal{F}(A)$ to denote the fibre category
over an object $A$ of $\mathcal{C}_\Lambda$. An object of $\mathcal{F}(A)$
is simply a morphism $x_0 \to x$ of $\mathcal{X}$ such that
$x$ lies over $\Spec(A)$ and $x_0 \to x$ lies over $\Spec(k) \to \Spec(A)$.

\begin{lemma}
\label{lemma-predeformation-category}
The functor $p : \mathcal{F} \to \mathcal{C}_\Lambda$ defined above
is a predeformation category.
\end{lemma}

\begin{proof}
We have to show that $\mathcal{F}$ is (a) cofibred in groupoids over
$\mathcal{C}_\Lambda$ and (b) that $\mathcal{F}(k)$ is a category equivalent
to a category with a single object and a single morphism.

\medskip\noindent
Proof of (a). The fibre categories of $\mathcal{F}$
over $\mathcal{C}_\Lambda$ are groupoids as the fibre categories
of $\mathcal{X}$ are groupoids. Let $A \to A'$ be a morphism of
$\mathcal{C}_\Lambda$ and let $x_0 \to x$ be an object of $\mathcal{F}(A)$.
Because $\mathcal{X}$ is fibred in groupoids, we can find a morphism
$x' \to x$ lying over $\Spec(A') \to \Spec(A)$. Since the composition
$A \to A' \to k$ is equal the given map $A \to k$ we see (by uniqueness
of pullbacks up to isomorphism) that the pullback via $\Spec(k) \to \Spec(A')$
of $x'$ is $x_0$, i.e., that there exists a morphism $x_0 \to x'$
lying over $\Spec(k) \to \Spec(A')$ compatible with
$x_0 \to x$ and $x' \to x$. This proves that $\mathcal{F}$ has
pushforwards. We conclude by (the dual of)
Categories, Lemma \ref{categories-lemma-fibred-groupoids}.

\medskip\noindent
Proof of (b). If $A = k$, then $\Spec(k) = \Spec(A)$ and since $\mathcal{X}$
is fibred in groupoids over $(\Sch/S)_{fppf}$ we see that given any object
$x_0 \to x$ in $\mathcal{F}(k)$ the morphism $x_0 \to x$ is an isomorphism.
Hence every object of $\mathcal{F}(k)$ is isomorphic to $x_0 \to x_0$.
Clearly the only self morphism of $x_0 \to x_0$ in $\mathcal{F}$ is
the identity.
\end{proof}

\noindent
Let $S$ be a locally Noetherian base scheme. Let
$F : \mathcal{X} \to \mathcal{Y}$ be a $1$-morphism between categories
fibred in groupoids over $(\Sch/S)_{fppf}$. Let $k$ is a field
of finite type over $S$. Let $x_0$ be an object of $\mathcal{X}$ lying
over $\Spec(k)$. Set $y_0 = F(x_0)$ which is an object of $\mathcal{Y}$
lying over $\Spec(k)$. Then $F$ induces a functor
\begin{equation}
\label{equation-functoriality}
F :
\mathcal{F}_{\mathcal{X}, k, x_0}
\longrightarrow
\mathcal{F}_{\mathcal{Y}, k, y_0}
\end{equation}
of categories cofibred over $\mathcal{C}_\Lambda$. Namely, to the object
$x_0 \to x$ of $\mathcal{F}_{\mathcal{X}, k, x_0}(A)$ we associate
the object $F(x_0) \to F(x)$ of $\mathcal{F}_{\mathcal{Y}, k, y_0}(A)$.

\begin{lemma}
\label{lemma-formally-smooth-on-deformation-categories}
Let $S$ be a locally Noetherian scheme. Let $F : \mathcal{X} \to \mathcal{Y}$
be a $1$-morphism of categories fibred in groupoids over $(\Sch/S)_{fppf}$.
Assume either
\begin{enumerate}
\item $F$ is formally smooth on objects (Criteria for Representability,
Section \ref{criteria-section-formally-smooth}),
\item $F$ is representable by algebraic spaces and formally smooth, or
\item $F$ is representable by algebraic spaces and smooth.
\end{enumerate}
Then for every finite type field $k$ over $S$ and object
$x_0$ of $\mathcal{X}$ over $k$ the functor (\ref{equation-functoriality})
is smooth in the sense of
Formal Deformation Theory, Definition
\ref{formal-defos-definition-smooth-morphism}.
\end{lemma}

\begin{proof}
Case (1) is a matter of unwinding the definitions.
Assumption (2) implies (1) by
Criteria for Representability, Lemma
\ref{criteria-lemma-representable-by-spaces-formally-smooth}.
Assumption (3) implies (2) by
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-smooth-formally-smooth}
and the principle of
Algebraic Stacks, Lemma
\ref{algebraic-lemma-representable-transformations-property-implication}.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-deformation-categories}
Let $S$ be a locally Noetherian scheme. Let
$$
\xymatrix{
\mathcal{W} \ar[d] \ar[r] & \mathcal{Z} \ar[d] \\
\mathcal{X} \ar[r] & \mathcal{Y}
}
$$
be a $2$-fibre product of categories fibred in groupoids over
$(\Sch/S)_{fppf}$. Let $k$ be a finite type field over $S$ and
$w_0$ an object of $\mathcal{W}$ over $k$. Let $x_0, z_0, y_0$ be
the images of $w_0$ under the morphisms in the diagram. Then
$$
\xymatrix{
\mathcal{F}_{\mathcal{W}, k, w_0} \ar[d] \ar[r] &
\mathcal{F}_{\mathcal{Z}, k, z_0} \ar[d] \\
\mathcal{F}_{\mathcal{X}, k, x_0} \ar[r] & \mathcal{F}_{\mathcal{Y}, k, y_0}
}
$$
is a fibre product of predeformation categories.
\end{lemma}

\begin{proof}
This is a matter of unwinding the definitions. Details omitted.
\end{proof}






\section{Pushouts and stacks}
\label{section-pushouts}

\noindent
In this section we show that algebraic stacks behave well with
respect to certain pushouts. The results in this section hold over
any base scheme.

\medskip\noindent
The following lemma is also correct when $Y$, $X'$, $X$, $Y'$ are
algebraic spaces, see (insert future reference here).

\begin{lemma}
\label{lemma-pushout}
\begin{slogan}
Algebraic stacks satisfy the (strong) Rim-Schlessinger condition
\end{slogan}
Let $S$ be a scheme. Let
$$
\xymatrix{
X \ar[r] \ar[d] & X' \ar[d] \\
Y \ar[r] & Y'
}
$$
be a pushout in the category of schemes over $S$ where $X \to X'$
is a thickening and $X \to Y$ is affine, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-pushout-along-thickening}.
Let $\mathcal{Z}$ be an algebraic stack over $S$.
Then the functor of fibre categories
$$
\mathcal{Z}_{Y'}
\longrightarrow
\mathcal{Z}_Y \times_{\mathcal{Z}_X} \mathcal{Z}_{X'}
$$
is an equivalence of categories.
\end{lemma}

\begin{proof}
Let $y'$ be an object of left hand side. The sheaf
$\mathit{Isom}(y', y')$ on the category of schemes over $Y'$
is representable by an algebraic space $I$ over $Y'$, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}.
We conclude that the functor of the lemma is fully faithful as
$Y'$ is the pushout in the category of algebraic spaces as
well as the category of schemes, see
Pushouts of Spaces, Lemma
\ref{spaces-pushouts-lemma-pushout-along-thickening-schemes}.

\medskip\noindent
Let $(y, x', f)$ be an object of the right hand side. Here $f : y|_X \to x'|_X$
is an isomorphism. To finish the proof we have to construct an object $y'$ of
$\mathcal{Z}_{Y'}$ whose restrictions to $Y$ and $X'$ agree with $y$ and $x'$
in a manner compatible with $f$. In fact, it suffices to construct $y'$
fppf locally on $Y'$, see
Stacks, Lemma \ref{stacks-lemma-characterize-essentially-surjective-when-ff}.
Choose a representable algebraic stack
$\mathcal{W}$ and a surjective smooth morphism $\mathcal{W} \to \mathcal{Z}$.
Then
$$
(\Sch/Y)_{fppf} \times_{y, \mathcal{Z}} \mathcal{W}
\quad\text{and}\quad
(\Sch/X')_{fppf} \times_{x', \mathcal{Z}} \mathcal{W}
$$
are algebraic stacks representable by algebraic spaces $V$ and $U'$
smooth over $Y$ and $X'$. The isomorphism $f$ induces an isomorphism
$\varphi : V \times_Y X \to U' \times_{X'} X$ over $X$. By
Pushouts of Spaces, Lemmas
\ref{spaces-pushouts-lemma-pushout-along-thickening} and
\ref{spaces-pushouts-lemma-equivalence-categories-spaces-pushout-flat}
we see that the pushout $V' = V \amalg_{V \times_Y X} U'$ is
an algebraic space smooth over $Y'$ whose base change to
$Y$ and $X'$ recovers $V$ and $U'$ in a manner compatible with $\varphi$.

\medskip\noindent
Let $W$ be the algebraic space representing $\mathcal{W}$.
The projections $V \to W$ and $U' \to W$ agree as morphisms
over $V \times_Y X \cong U' \times_{X'} X$ hence the universal
property of the pushout determines a morphism of algebraic spaces
$V' \to W$. Choose a scheme $Y_1'$ and a surjective \'etale morphism
$Y_1' \to V'$. Set $Y_1 = Y \times_{Y'} Y_1'$,
$X_1' = X' \times_{Y'} Y_1'$, $X_1 = X \times_{Y'} Y_1'$.
The composition
$$
(\Sch/Y_1') \to (\Sch/V') \to (\Sch/W) = \mathcal{W} \to \mathcal{Z}
$$
corresponds by the $2$-Yoneda lemma to an object $y_1'$ of $\mathcal{Z}$
over $Y_1'$ whose restriction to $Y_1$ and $X_1'$ agrees with $y|_{Y_1}$
and $x'|_{X_1'}$ in a manner compatible with $f|_{X_1}$. Thus we have
constructed our desired object smooth locally over $Y'$ and we win.
\end{proof}








\section{The Rim-Schlessinger condition}
\label{section-RS}

\noindent
The motivation for the following definition comes from
Lemma \ref{lemma-pushout}
and
Formal Deformation Theory, Definition \ref{formal-defos-definition-RS} and
Lemma \ref{formal-defos-lemma-RS-2-categorical}.

\begin{definition}
\label{definition-RS}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{Z}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. We say $\mathcal{Z}$
satisfies {\it condition (RS)} if for every pushout
$$
\xymatrix{
X \ar[r] \ar[d] & X' \ar[d] \\
Y \ar[r] & Y' = Y \amalg_X X'
}
$$
in the category of schemes over $S$ where
\begin{enumerate}
\item $X$, $X'$, $Y$, $Y'$ are spectra of local Artinian rings,
\item $X$, $X'$, $Y$, $Y'$ are of finite type over $S$, and
\item $X \to X'$ (and hence $Y \to Y'$) is a closed immersion
\end{enumerate}
the functor of fibre categories
$$
\mathcal{Z}_{Y'}
\longrightarrow
\mathcal{Z}_Y \times_{\mathcal{Z}_X} \mathcal{Z}_{X'}
$$
is an equivalence of categories.
\end{definition}

\noindent
If $A$ is an Artinian local ring with residue field $k$, then
any morphism $\Spec(A) \to S$ is affine and of finite type if and
only if the induced morphism $\Spec(k) \to S$ is of finite type, see
Morphisms, Lemmas \ref{morphisms-lemma-Artinian-affine} and
\ref{morphisms-lemma-artinian-finite-type}.

\begin{lemma}
\label{lemma-algebraic-stack-RS}
Let $\mathcal{X}$ be an algebraic stack over a locally Noetherian base
$S$. Then $\mathcal{X}$ satisfies (RS).
\end{lemma}

\begin{proof}
Immediate from the definitions and Lemma \ref{lemma-pushout}.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-RS}
Let $S$ be a scheme. Let $p : \mathcal{X} \to \mathcal{Y}$ and
$q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. If $\mathcal{X}$, $\mathcal{Y}$,
and $\mathcal{Z}$ satisfy (RS), then so
does $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$.
\end{lemma}

\begin{proof}
This is formal. Let 
$$
\xymatrix{
X \ar[r] \ar[d] & X' \ar[d] \\
Y \ar[r] & Y' = Y \amalg_X X'
}
$$
be a diagram as in Definition \ref{definition-RS}. We have to show that
$$
(\mathcal{X} \times_{\mathcal{Y}} \mathcal{Z})_{Y'}
\longrightarrow
(\mathcal{X} \times_{\mathcal{Y}} \mathcal{Z})_Y
\times_{(\mathcal{X} \times_{\mathcal{Y}} \mathcal{Z})_X}
(\mathcal{X} \times_{\mathcal{Y}} \mathcal{Z})_{X'}
$$
is an equivalence. Using the definition of the $2$-fibre product
this becomes
\begin{equation}
\label{equation-RS-fibre-product}
\mathcal{X}_{Y'} \times_{\mathcal{Y}_{Y'}} \mathcal{Z}_{Y'}
\longrightarrow
(\mathcal{X}_Y \times_{\mathcal{Y}_Y} \mathcal{Z}_Y)
\times_{(\mathcal{X}_X \times_{\mathcal{Y}_X} \mathcal{Z}_X)}
(\mathcal{X}_{X'} \times_{\mathcal{Y}_{X'}} \mathcal{Z}_{X'}).
\end{equation}
We are given that each of the functors
$$
\mathcal{X}_{Y'} \to \mathcal{X}_Y \times_{\mathcal{Y}_Y} \mathcal{Z}_Y,
\quad
\mathcal{Y}_{Y'} \to \mathcal{X}_X \times_{\mathcal{Y}_X} \mathcal{Z}_X,
\quad
\mathcal{Z}_{Y'} \to
\mathcal{X}_{X'} \times_{\mathcal{Y}_{X'}} \mathcal{Z}_{X'}
$$
are equivalences. An object of the right hand side of
(\ref{equation-RS-fibre-product}) is a system
$$
((x_Y, z_Y, \phi_Y), (x_{X'}, z_{X'}, \phi_{X'}), (\alpha, \beta)).
$$
Then $(x_Y, x_{Y'}, \alpha)$ is isomorphic to the image of an object
$x_{Y'}$ in $\mathcal{X}_{Y'}$ and $(z_Y, z_{Y'}, \beta)$ is isomorphic
to the image of an object $z_{Y'}$ of $\mathcal{Z}_{Y'}$. The pair of
morphisms $(\phi_Y, \phi_{X'})$ corresponds to a morphism $\psi$
between the images of $x_{Y'}$ and $z_{Y'}$ in $\mathcal{Y}_{Y'}$.
Then $(x_{Y'}, z_{Y'}, \psi)$ is an object of the left hand side of
(\ref{equation-RS-fibre-product}) mapping to the given object of the
right hand side. This proves that (\ref{equation-RS-fibre-product}) is
essentially surjective. We omit the proof that it is fully faithful.
\end{proof}





\section{Deformation categories}
\label{section-deformation-categories}

\noindent
We match the notation introduced above with the notation from the
chapter ``Formal Deformation Theory''.

\begin{lemma}
\label{lemma-deformation-category}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$ satisfying (RS). For any field
$k$ of finite type over $S$ and any object $x_0$ of $\mathcal{X}$ lying
over $k$ the predeformation category
$p : \mathcal{F}_{\mathcal{X}, k, x_0} \to \mathcal{C}_\Lambda$
(\ref{equation-predeformation-category}) is a deformation category, see
Formal Deformation Theory, Definition
\ref{formal-defos-definition-deformation-category}.
\end{lemma}

\begin{proof}
Set $\mathcal{F} = \mathcal{F}_{\mathcal{X}, k, x_0}$.
Let $f_1 : A_1 \to A$ and $f_2 : A_2 \to A$ be ring maps in
$\mathcal{C}_\Lambda$ with $f_2$ surjective. We have to show that
the functor
$$
\mathcal{F}(A_1 \times_A A_2)
\longrightarrow
\mathcal{F}(A_1) \times_{\mathcal{F}(A)} \mathcal{F}(A_2)
$$
is an equivalence, see
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-RS-2-categorical}.
Set $X = \Spec(A)$, $X' = \Spec(A_2)$, $Y = \Spec(A_1)$ and
$Y' = \Spec(A_1 \times_A A_2)$. Note that $Y' = Y \amalg_X X'$ in the
category of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-pushout-along-thickening}.
We know that in the diagram of functors of fibre categories
$$
\xymatrix{
\mathcal{X}_{Y'} \ar[r] \ar[d] &
\mathcal{X}_Y \times_{\mathcal{X}_X} \mathcal{X}_{X'} \ar[d] \\
\mathcal{X}_{\Spec(k)} \ar@{=}[r] & \mathcal{X}_{\Spec(k)}
}
$$
the top horizontal arrow is an equivalence by
Definition \ref{definition-RS}.
Since $\mathcal{F}(B)$ is the category of objects of $\mathcal{X}_{\Spec(B)}$
with an identification with $x_0$ over $k$ we win.
\end{proof}

\begin{remark}
\label{remark-deformation-category-implies}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be fibred
in groupoids over $(\Sch/S)_{fppf}$. Let $k$ be a field of finite type over
$S$ and $x_0$ an object
of $\mathcal{X}$ over $k$. Let $p : \mathcal{F} \to \mathcal{C}_\Lambda$
be as in (\ref{equation-predeformation-category}). If $\mathcal{F}$
is a deformation category, i.e., if $\mathcal{F}$ satisfies the
Rim-Schlessinger condition (RS), then we see that $\mathcal{F}$ satisfies
Schlessinger's conditions (S1) and (S2) by
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-RS-implies-S1-S2}.
Let $\overline{\mathcal{F}}$ be the functor of isomorphism classes, see
Formal Deformation Theory, Remarks
\ref{formal-defos-remarks-cofibered-groupoids}
(\ref{formal-defos-item-associated-functor-isomorphism-classes}).
Then $\overline{\mathcal{F}}$ satisfies (S1) and (S2) as well, see
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-S1-S2-associated-functor}.
This holds in particular in the situation of
Lemma \ref{lemma-deformation-category}.
\end{remark}




\section{Change of field}
\label{section-change-of-field}

\noindent
This section is the analogue of
Formal Deformation Theory, Section \ref{formal-defos-section-change-of-field}.
As pointed out there, to discuss what happens under change of field
we need to write $\mathcal{C}_{\Lambda, k}$ instead of $\mathcal{C}_\Lambda$.
In the following lemma we use the notation $\mathcal{F}_{l/k}$
introduced in Formal Deformation Theory, Situation
\ref{formal-defos-situation-change-of-fields}.

\begin{lemma}
\label{lemma-change-of-field}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Let $k$ be a
field of finite type over $S$ and let $l/k$ be a finite extension.
Let $x_0$ be an object of $\mathcal{F}$ lying over $\Spec(k)$.
Denote $x_{l, 0}$ the restriction of $x_0$ to $\Spec(l)$.
Then there is a canonical functor
$$
(\mathcal{F}_{\mathcal{X}, k , x_0})_{l/k}
\longrightarrow
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
$$
of categories cofibred in groupoids over $\mathcal{C}_{\Lambda, l}$.
If $\mathcal{X}$ satisfies (RS), then this functor is an equivalence.
\end{lemma}

\begin{proof}
Consider a factorization
$$
\Spec(l) \to \Spec(B) \to S
$$
as in (\ref{equation-factor}). By definition we have
$$
(\mathcal{F}_{\mathcal{X}, k , x_0})_{l/k}(B) =
\mathcal{F}_{\mathcal{X}, k, x_0}(B \times_l k)
$$
see Formal Deformation Theory, Situation
\ref{formal-defos-situation-change-of-fields}. Thus an object of this
is a morphism $x_0 \to x$ of $\mathcal{X}$ lying over the morphism
$\Spec(k) \to \Spec(B \times_l k)$. Choosing pullback functor for $\mathcal{X}$
we can associate to $x_0 \to x$ the morphism $x_{l, 0} \to x_B$
where $x_B$ is the restriction of $x$ to $\Spec(B)$ (via the morphism
$\Spec(B) \to \Spec(B \times_l k)$ coming from $B \times_l k \subset B$).
This construction is functorial in $B$ and compatible with morphisms.

\medskip\noindent
Next, assume $\mathcal{X}$ satisfies (RS). Consider the diagrams
$$
\vcenter{
\xymatrix{
l & B \ar[l] \\
k \ar[u] & B \times_l k \ar[l] \ar[u]
}
}
\quad\text{and}\quad
\vcenter{
\xymatrix{
\Spec(l) \ar[d] \ar[r] & \Spec(B) \ar[d] \\
\Spec(k) \ar[r] & \Spec(B \times_l k)
}
}
$$
The diagram on the left is a fibre product of rings. The diagram on the
right is a pushout in the category of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-pushout-along-thickening}.
These schemes are all of finite type over $S$ (see remarks following
Definition \ref{definition-RS}). Hence (RS) kicks in to give an equivalence
of fibre categories
$$
\mathcal{X}_{\Spec(B \times_l k)}
\longrightarrow
\mathcal{X}_{\Spec(k)}
\times_{\mathcal{X}_{\Spec(l)}}
\mathcal{X}_{\Spec(B)}
$$
This implies that the functor defined above gives an equivalence of
fibre categories. Hence the functor is an equivalence on categories
cofibred in groupoids by (the dual of)
Categories, Lemma \ref{categories-lemma-equivalence-fibred-categories}.
\end{proof}








\section{Tangent spaces}
\label{section-tangent-spaces}

\noindent
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Let $k$ be a field of finite
type over $S$ and let $x_0$ be an object of $\mathcal{X}$ over $k$.
In Formal Deformation Theory, Section \ref{formal-defos-section-tangent-spaces}
we have defined the {\it tangent space}
\begin{equation}
\label{equation-tangent-space}
T\mathcal{F}_{\mathcal{X}, k, x_0} =
\left\{
\begin{matrix}
\text{isomorphism classes of morphisms}\\
x_0 \to x\text{ over }\Spec(k) \to \Spec(k[\epsilon])
\end{matrix}
\right\}
\end{equation}
of the predeformation category $\mathcal{F}_{\mathcal{X}, k, x_0}$.
In Formal Deformation Theory, Section
\ref{formal-defos-section-infinitesimal-automorphisms}
we have defined
\begin{equation}
\label{equation-infinitesimal-automorphisms}
\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0}) =
\Ker\left(
\text{Aut}_{\Spec(k[\epsilon])}(x'_0) \to \text{Aut}_{\Spec(k)}(x_0)
\right)
\end{equation}
where $x_0'$ is the pullback of $x_0$ to $\Spec(k[\epsilon])$.
If $\mathcal{X}$ satisfies the Rim-Schlessinger condition (RS), then
$T\mathcal{F}_{\mathcal{X}, k, x_0}$ comes equipped with a natural
$k$-vector space structure by Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-tangent-space-vector-space}
(assumptions hold by Lemma \ref{lemma-deformation-category} and
Remark \ref{remark-deformation-category-implies}). Moreover,
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-infaut-vector-space}
shows that $\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0})$ has a
natural $k$-vector space structure such that addition agrees with
composition of automorphisms. A natural condition
is to ask these vector spaces to have finite dimension.

\medskip\noindent
The following lemma tells us this is true if
$\mathcal{X}$ is locally of finite type over $S$ (see
Morphisms of Stacks, Section \ref{stacks-morphisms-section-finite-type}).

\begin{lemma}
\label{lemma-finite-dimension}
Let $S$ be a locally Noetherian scheme. Assume
\begin{enumerate}
\item $\mathcal{X}$ is an algebraic stack,
\item $U$ is a scheme locally of finite type over $S$, and
\item $(\Sch/U)_{fppf} \to \mathcal{X}$ is a smooth surjective
morphism.
\end{enumerate}
Then, for any $\mathcal{F} = \mathcal{F}_{\mathcal{X}, k, x_0}$ as in
Section \ref{section-predeformation-categories}
the tangent space $T\mathcal{F}$ and infinitesimal automorphism space
$\text{Inf}(\mathcal{F})$ have finite dimension over $k$.
\end{lemma}

\begin{proof}
Let us write $\mathcal{U} = (\Sch/U)_{fppf}$. By our definition
of algebraic stacks the $1$-morphism $\mathcal{U} \to \mathcal{X}$
is representable by algebraic spaces. Hence in particular the
2-fibre product
$$
\mathcal{U}_{x_0} = (\Sch/\Spec(k))_{fppf} \times_\mathcal{X} \mathcal{U}
$$
is representable by an algebraic space $U_{x_0}$ over $\Spec(k)$. Then
$U_{x_0} \to \Spec(k)$ is smooth and surjective (in particular $U_{x_0}$
is nonempty). By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-smooth-separable-closed-points-dense}
we can find a finite extension $l/k$ and a point
$\Spec(l) \to U_{x_0}$ over $k$. We have
$$
(\mathcal{F}_{\mathcal{X}, k , x_0})_{l/k} =
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
$$
by Lemma \ref{lemma-change-of-field} and the fact that $\mathcal{X}$
satisfies (RS). Thus we see that
$$
T\mathcal{F} \otimes_k l \cong T\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
\quad\text{and}\quad
\text{Inf}(\mathcal{F}) \otimes_k l \cong
\text{Inf}(\mathcal{F}_{\mathcal{X}, l, x_{l, 0}})
$$
by
Formal Deformation Theory, Lemmas
\ref{formal-defos-lemma-tangent-space-change-of-field} and
\ref{formal-defos-lemma-inf-aut-change-of-field}
(these are applicable by
Lemmas \ref{lemma-algebraic-stack-RS} and
\ref{lemma-deformation-category} and
Remark \ref{remark-deformation-category-implies}).
Hence it suffices to prove that $T\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}$
and $\text{Inf}(\mathcal{F}_{\mathcal{X}, l, x_{l, 0}})$
have finite dimension over $l$. Note that $x_{l, 0}$ comes from a point
$u_0$ of $\mathcal{U}$ over $l$.

\medskip\noindent
We interrupt the flow of the argument to show that the lemma for
infinitesimal automorphisms follows from the lemma for tangent spaces.
Namely, let
$\mathcal{R} = \mathcal{U} \times_\mathcal{X} \mathcal{U}$.
Let $r_0$ be the $l$-valued point $(u_0, u_0, \text{id}_{x_0})$ of
$\mathcal{R}$. Combining
Lemma \ref{lemma-fibre-product-deformation-categories} and
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-deformation-functor-diagonal}
we see that
$$
\text{Inf}(\mathcal{F}_{\mathcal{X}, l, x_{l, 0}})
\subset
T\mathcal{F}_{\mathcal{R}, l, r_0}
$$
Note that $\mathcal{R}$ is an algebraic stack, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-2-fibre-product-general}.
Also, $\mathcal{R}$ is representable by an algebraic space $R$
smooth over $U$ (via either projection, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-stack-presentation}).
Hence, choose an scheme $U'$ and a surjective \'etale morphism
$U' \to R$ we see that $U'$ is smooth over $U$, hence locally of
finite type over $S$. As $(\Sch/U')_{fppf} \to \mathcal{R}$ is
surjective and smooth, we have reduced the question to the case
of tangent spaces.

\medskip\noindent
The functor (\ref{equation-functoriality})
$$
\mathcal{F}_{\mathcal{U}, l, u_0}
\longrightarrow
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
$$
is smooth by Lemma \ref{lemma-formally-smooth-on-deformation-categories}.
The induced map on tangent spaces
$$
T\mathcal{F}_{\mathcal{U}, l, u_0}
\longrightarrow
T\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
$$
is $l$-linear (by
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-k-linear-differential})
and surjective (as smooth maps of predeformation categories induce
surjective maps on tangent spaces by
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-smooth-morphism-essentially-surjective}).
Hence it suffices to prove that the tangent space of the deformation
space associated to the representable algebraic stack $\mathcal{U}$
at the point $u_0$ is finite dimensional. Let $\Spec(R) \subset U$ be
an affine open such that $u_0 : \Spec(l) \to U$ factors through $\Spec(R)$
and such that $\Spec(R) \to S$ factors through $\Spec(\Lambda) \subset S$.
Let $\mathfrak m_R \subset R$ be the kernel of the $\Lambda$-algebra map
$\varphi_0 : R \to l$ corresponding to $u_0$. Note that $R$, being of finite
type over the Noetherian ring $\Lambda$, is a Noetherian ring. Hence
$\mathfrak m_R = (f_1, \ldots, f_n)$ is a finitely generated ideal.
We have
$$
T\mathcal{F}_{\mathcal{U}, l, u_0}
=
\{\varphi : R \to l[\epsilon] \mid
\varphi \text{ is a } \Lambda\text{-algebra map and }
\varphi \bmod \epsilon = \varphi_0\}
$$
An element of the right hand side is determined by its values on
$f_1, \ldots, f_n$ hence the dimension is at most $n$ and we win.
Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-tangent-spaces}
Let $S$ be a locally Noetherian scheme. Let $p : \mathcal{X} \to \mathcal{Y}$
and $q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. Assume $\mathcal{X}$,
$\mathcal{Y}$, $\mathcal{Z}$ satisfy (RS).
Let $k$ be a field of finite type over $S$ and let $w_0$ be an object of
$\mathcal{W} = \mathcal{X} \times_\mathcal{Y} \mathcal{Z}$ over $k$.
Denote $x_0, y_0, z_0$ the objects of $\mathcal{X}, \mathcal{Y}, \mathcal{Z}$
you get from $w_0$. Then there is a $6$-term exact sequence
$$
\xymatrix{
0 \ar[r] &
\text{Inf}(\mathcal{F}_{\mathcal{W}, k, w_0}) \ar[r] &
\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0}) \oplus
\text{Inf}(\mathcal{F}_{\mathcal{Z}, k, z_0}) \ar[r] &
\text{Inf}(\mathcal{F}_{\mathcal{Y}, k, y_0}) \ar[lld] \\
 &
T\mathcal{F}_{\mathcal{W}, k, w_0} \ar[r] &
T\mathcal{F}_{\mathcal{X}, k, x_0} \oplus
T\mathcal{F}_{\mathcal{Z}, k, z_0} \ar[r] &
T\mathcal{F}_{\mathcal{Y}, k, y_0}
}
$$
of $k$-vector spaces.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-fibre-product-RS} we see that $\mathcal{W}$
satisfies (RS) and hence the lemma makes sense. To see the lemma
is true, apply Lemmas \ref{lemma-fibre-product-deformation-categories} and
\ref{lemma-deformation-category}
and Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-deformation-categories-fiber-product-morphisms}.
\end{proof}






\section{Formal objects}
\label{section-formal-objects}

\noindent
In this section we transfer some of the notions already defined
in the chapter ``Formal Deformation Theory'' to the current setting.
In the following we will say ``$R$ is an $S$-algebra'' to indicate
that $R$ is a ring endowed with a morphism of schemes $\Spec(R) \to S$.

\begin{definition}
\label{definition-formal-objects}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
\begin{enumerate}
\item A {\it formal object} $\xi = (R, \xi_n, f_n)$ of $\mathcal{X}$ consists
of a Noetherian complete local $S$-algebra $R$, objects $\xi_n$ of
$\mathcal{X}$ lying over $\Spec(R/\mathfrak m_R^n)$, and morphisms
$f_n : \xi_n \to \xi_{n + 1}$ of $\mathcal{X}$ lying over
$\Spec(R/\mathfrak m^n) \to \Spec(R/\mathfrak m^{n + 1})$
such that $R/\mathfrak m$ is a field of finite type over $S$.
\item A {\it morphism of formal objects}
$a : \xi = (R, \xi_n, f_n) \to \eta = (T, \eta_n, g_n)$
is given by morphisms $a_n : \xi_n \to \eta_n$ such that for every $n$
the diagram
$$
\xymatrix{
\xi_n \ar[r]_{f_n} \ar[d]_{a_n} & \xi_{n + 1} \ar[d]^{a_{n + 1}} \\
\eta_n \ar[r]^{g_n} & \eta_{n + 1}
}
$$
is commutative. Applying the functor $p$ we obtain a compatible collection
of morphisms $\Spec(R/\mathfrak m_R^n) \to \Spec(T/\mathfrak m_T^n)$ and
hence a morphism $a_0 : \Spec(R) \to \Spec(T)$ over $S$. We say that
$a$ {\it lies over} $a_0$.
\end{enumerate}
\end{definition}

\noindent
Thus we obtain a category of formal objects of $\mathcal{X}$.

\begin{remark}
\label{remark-formal-objects-match}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Let $\xi = (R, \xi_n, f_n)$ be a formal object. Set $k = R/\mathfrak m$ and
$x_0 = \xi_1$. The formal object $\xi$ defines a formal object
$\xi$ of the predeformation category $\mathcal{F}_{\mathcal{X}, k, x_0}$.
This follows immediately from
Definition \ref{definition-formal-objects} above,
Formal Deformation Theory, Definition
\ref{formal-defos-definition-formal-objects},
and our construction of the predeformation category
$\mathcal{F}_{\mathcal{X}, k, x_0}$ in
Section \ref{section-predeformation-categories}.
\end{remark}

\noindent
If $F : \mathcal{X} \to \mathcal{Y}$ is a $1$-morphism of categories fibred
in groupoids over $(\Sch/S)_{fppf}$, then $F$ induces a functor between
categories of formal objects as well.

\begin{lemma}
\label{lemma-smooth-lift-formal}
Let $S$ be a locally Noetherian scheme. Let $F : \mathcal{X} \to \mathcal{Y}$
be a $1$-morphism of categories fibred in groupoids over $(\Sch/S)_{fppf}$.
Let $\eta = (R, \eta_n, g_n)$ be a formal object of $\mathcal{Y}$
and let $\xi_1$ be an object of $\mathcal{X}$ with $F(\xi_1) \cong \eta_1$.
If $F$ is formally smooth on objects (see
Criteria for Representability, Section \ref{criteria-section-formally-smooth}),
then there exists a formal object $\xi = (R, \xi_n, f_n)$ of $\mathcal{X}$
such that $F(\xi) \cong \eta$.
\end{lemma}

\begin{proof}
Note that each of the morphisms
$\Spec(R/\mathfrak m^n) \to \Spec(R/\mathfrak m^{n + 1})$ is a first order
thickening of affine schemes over $S$. Hence the assumption on $F$ means
that we can successively lift $\xi_1$ to objects $\xi_2, \xi_3, \ldots$
of $\mathcal{X}$ endowed with compatible isomorphisms
$\eta_n|_{\Spec(R/\mathfrak m^{n - 1})} \cong \eta_{n - 1}$
and $F(\eta_n) \cong \xi_n$.
\end{proof}

\noindent
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Suppose that $x$ is an object of $\mathcal{X}$ over $R$, where $R$ is a
Noetherian complete local $S$-algebra with residue field of finite type
over $S$. Then we can consider the system of restrictions
$\xi_n = x|_{\Spec(R/\mathfrak m^n)}$ endowed with the natural morphisms
$\xi_1 \to \xi_2 \to \ldots$ coming from transitivity of restriction.
Thus $\xi = (R, \xi_n, \xi_n \to \xi_{n + 1})$ is a formal object of
$\mathcal{X}$. This construction is functorial in the object $x$.
Thus we obtain a functor
\begin{equation}
\label{equation-approximation}
\left\{
\begin{matrix}
\text{objects }x\text{ of }\mathcal{X} \text{ such that }p(x) = \Spec(R) \\
\text{where }R\text{ is Noetherian complete local}\\
\text{with }R/\mathfrak m\text{ of finite type over }S
\end{matrix}
\right\}
\longrightarrow
\left\{
\begin{matrix}
\text{formal objects of }\mathcal{X}
\end{matrix}
\right\}
\end{equation}
To be precise the left hand side is the full subcategory of $\mathcal{X}$
consisting of objects as indicated and the right hand side is the category
of formal objects of $\mathcal{X}$ as in
Definition \ref{definition-formal-objects}.

\begin{definition}
\label{definition-effective}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. A formal object
$\xi = (R, \xi_n, f_n)$ of $\mathcal{X}$ is called {\it effective}
if it is in the essential image of the functor
(\ref{equation-approximation}).
\end{definition}

\noindent
If the category fibred in groupoids is an algebraic stack, then every
formal object is effective as follows from the next lemma.

\begin{lemma}
\label{lemma-effective}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be an algebraic
stack over $S$. The functor (\ref{equation-approximation}) is an equivalence.
\end{lemma}

\begin{proof}
Case I: $\mathcal{X}$ is representable (by a scheme). Say
$\mathcal{X} = (\Sch/X)_{fppf}$ for some scheme $X$ over $S$.
Unwinding the definitions we have to prove the following: Given
a Noetherian complete local $S$-algebra $R$ with $R/\mathfrak m$ of
finite type over $S$ we have
$$
\Mor_S(\Spec(R), X) \longrightarrow \lim \Mor_S(\Spec(R/\mathfrak m^n), X)
$$
is bijective. This follows from Formal Spaces, Lemma
\ref{formal-spaces-lemma-map-into-scheme}.

\medskip\noindent
Case II. $\mathcal{X}$ is representable by an algebraic space. Say
$\mathcal{X}$ is representable by $X$. Again we have to show that
$$
\Mor_S(\Spec(R), X) \longrightarrow \lim \Mor_S(\Spec(R/\mathfrak m^n), X)
$$
is bijective for $R$ as above. This is Formal Spaces, Lemma
\ref{formal-spaces-lemma-map-into-algebraic-space}.

\medskip\noindent
Case III: General case of an algebraic stack. A general remark is that
the left and right hand side of (\ref{equation-approximation}) are
categories fibred in groupoids over the category of affine schemes
over $S$ which are spectra of Noetherian complete local rings
with residue field of finite type over $S$. We will also see in the
proof below that they form stacks for a certain topology on this
category.

\medskip\noindent
We first prove fully faithfulness. Let $R$ be a Noetherian complete
local $S$-algebra with $k = R/\mathfrak m$ of finite type over $S$.
Let $x, x'$ be objects of $\mathcal{X}$ over $R$. As $\mathcal{X}$ is
an algebraic stack $\mathit{Isom}(x, x')$ is representable by an
algebraic space $I$ over $\Spec(R)$, see
Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}.
Applying Case II to $I$ over $\Spec(R)$ implies immediately that
(\ref{equation-approximation}) is fully faithful on fibre categories over
$\Spec(R)$. Hence the functor is fully faithful by
Categories, Lemma \ref{categories-lemma-equivalence-fibred-categories}.

\medskip\noindent
Essential surjectivity. Let $\xi = (R, \xi_n, f_n)$ be a formal object of
$\mathcal{X}$. Choose a scheme $U$ over $S$ and a surjective smooth morphism
$f : (\Sch/U)_{fppf} \to \mathcal{X}$. For every $n$ consider the fibre product
$$
(\Sch/\Spec(R/\mathfrak m^n))_{fppf}
\times_{\xi_n, \mathcal{X}, f}
(\Sch/U)_{fppf}
$$
By assumption this is representable by an algebraic space $V_n$ surjective and
smooth over $\Spec(R/\mathfrak m^n)$. The morphisms
$f_n : \xi_n \to \xi_{n + 1}$ induce cartesian squares
$$
\xymatrix{
V_{n + 1} \ar[d] & V_n \ar[d] \ar[l] \\
\Spec(R/\mathfrak m^{n + 1}) & \Spec(R/\mathfrak m^n) \ar[l]
}
$$
of algebraic spaces. By Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-smooth-separable-closed-points-dense}
we can find a finite separable extension $k'/k$ and a point
$v'_1 : \Spec(k') \to V_1$ over $k$. Let $R \subset R'$ be the finite \'etale
extension whose residue field extension is $k'/k$ (exists and
is unique by
Algebra, Lemmas \ref{algebra-lemma-henselian-cat-finite-etale} and
\ref{algebra-lemma-complete-henselian}).
By the infinitesimal lifting criterion of smoothness (see
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-smooth-formally-smooth})
applied to $V_n \to \Spec(R/\mathfrak m^n)$ for $n = 2, 3, 4, \ldots$
we can successively find morphisms
$v'_n : \Spec(R'/(\mathfrak m')^n) \to V_n$ over $\Spec(R/\mathfrak m^n)$
fitting into commutative diagrams
$$
\xymatrix{
\Spec(R'/(\mathfrak m')^{n + 1}) \ar[d]_{v'_{n + 1}} &
\Spec(R'/(\mathfrak m')^n) \ar[d]^{v'_n} \ar[l] \\
V_{n + 1} & V_n \ar[l]
}
$$
Composing with the projection morphisms $V_n \to U$ we obtain a compatible
system of morphisms $u'_n : \Spec(R'/(\mathfrak m')^n) \to U$.
By Case I the family $(u'_n)$ comes from a unique
morphism $u' : \Spec(R') \to U$. Denote $x'$ the object of $\mathcal{X}$
over $\Spec(R')$ we get by applying the $1$-morphism $f$ to $u'$.
By construction, there exists a morphism of formal objects
$$
(\ref{equation-approximation})(x') =
(R', x'|_{\Spec(R'/(\mathfrak m')^n)}, \ldots)
\longrightarrow
(R, \xi_n, f_n)
$$
lying over $\Spec(R') \to \Spec(R)$. Note that $R' \otimes_R R'$ is a finite
product of spectra of Noetherian complete local rings to which our current
discussion applies. Denote $p_0, p_1 : \Spec(R' \otimes_R R') \to \Spec(R')$
the two projections. By the fully faithfulness shown above there exists
a canonical isomorphism $\varphi : p_0^*x' \to p_1^*x'$ because we have
such isomorphisms over
$\Spec((R' \otimes_R R')/\mathfrak m^n(R' \otimes_R R'))$.
We omit the proof that the isomorphism $\varphi$ satisfies the cocycle
condition (see Stacks, Definition \ref{stacks-definition-descent-data}).
Since $\{\Spec(R') \to \Spec(R)\}$ is an fppf covering we conclude
that $x'$ descends to an object $x$ of $\mathcal{X}$ over $\Spec(R)$.
We omit the proof that $x_n$ is the restriction of $x$ to
$\Spec(R/\mathfrak m^n)$.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-effective}
Let $S$ be a scheme. Let $p : \mathcal{X} \to \mathcal{Y}$ and
$q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. If the functor
(\ref{equation-approximation}) is an equivalence for 
$\mathcal{X}$, $\mathcal{Y}$, and $\mathcal{Z}$, then it is 
an equivalence for $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$.
\end{lemma}

\begin{proof}
The left and the right hand side of (\ref{equation-approximation})
for $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$ are simply the $2$-fibre
products of the left and the right hand side of (\ref{equation-approximation})
for $\mathcal{X}$, $\mathcal{Z}$ over $\mathcal{Y}$.
Hence the result follows as taking $2$-fibre products is compatible
with equivalences of categories, see
Categories, Lemma \ref{categories-lemma-equivalence-2-fibre-product}.
\end{proof}






\section{Approximation}
\label{section-approximation}

\noindent
A fundamental insight of Michael Artin is that you can approximate
objects of a limit preserving stack. Namely, given an object $x$
of the stack over a Noetherian complete local ring, you can find
an object $x_A$ over an algebraic ring which is ``close to'' $x$.
Here an algebraic ring means a finite type $S$-algebra and close
means adically close. In this section we present this in a simple,
yet general form.

\medskip\noindent
To formulate the result we need to pull together some definitions from
different places in the Stacks project. First, in
Criteria for Representability, Section \ref{criteria-section-limit-preserving}
we introduced {\it limit preserving on objects} for $1$-morphisms
of categories fibred in groupoids over the category of schemes.
In More on Algebra, Definition \ref{more-algebra-definition-G-ring}
we defined the notion of a {\it G-ring}. Let $S$ be a locally Noetherian scheme.
Let $A$ be an $S$-algebra. We say that $A$ is {\it of finite type over $S$}
or is a {\it finite type $S$-algebra} if $\Spec(A) \to S$ is of finite type.
In this case $A$ is a Noetherian ring. Finally, given a ring $A$ and ideal
$I$ we denote $\text{Gr}_I(A) = \bigoplus I^n/I^{n + 1}$.

\begin{lemma}
\label{lemma-approximate}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category
fibred in groupoids. Let $x$ be an object of
$\mathcal{X}$ lying over $\Spec(R)$ where $R$ is a Noetherian complete
local ring with residue field $k$ of finite type over $S$. Let $s \in S$
be the image of $\Spec(k) \to S$. Assume that (a) $\mathcal{O}_{S, s}$ is
a G-ring and (b) $p$ is limit preserving on objects. Then for every
integer $N \geq 1$ there exist
\begin{enumerate}
\item a finite type $S$-algebra $A$,
\item a maximal ideal $\mathfrak m_A \subset A$,
\item an object $x_A$ of $\mathcal{X}$ over $\Spec(A)$,
\item an $S$-isomorphism $R/\mathfrak m_R^N \cong A/\mathfrak m_A^N$,
\item an isomorphism
$x|_{\Spec(R/\mathfrak m_R^N)} \cong x_A|_{\Spec(A/\mathfrak m_A^N)}$
compatible with (4), and
\item an isomorphism
$\text{Gr}_{\mathfrak m_R}(R) \cong \text{Gr}_{\mathfrak m_A}(A)$
of graded $k$-algebras.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose an affine open $\Spec(\Lambda) \subset S$ such that $k$ is a finite
$\Lambda$-algebra, see
Morphisms, Lemma \ref{morphisms-lemma-point-finite-type}.
We may and do replace $S$ by $\Spec(\Lambda)$.

\medskip\noindent
We may write $R$ as a directed colimit $R = \colim C_j$ where each
$C_j$ is a finite type $\Lambda$-algebra (see
Algebra, Lemma \ref{algebra-lemma-ring-colimit-fp}).
By assumption (b) the object $x$ is isomorphic to the restriction of
an object over one of the $C_j$. Hence we may choose a finite type
$\Lambda$-algebra $C$, a $\Lambda$-algebra map $C \to R$, and an object
$x_C$ of $\mathcal{X}$ over $\Spec(C)$ such that $x = x_C|_{\Spec(R)}$.
The choice of $C$ is a bookkeeping device and could be avoided.
For later use, let us write $C = \Lambda[y_1, \ldots, y_u]/(f_1, \ldots, f_v)$
and we denote $\overline{a}_i \in R$ the image of $y_i$ under the
map $C \to R$. Set $\mathfrak m_C = C \cap \mathfrak m_R$.

\medskip\noindent
Choose a $\Lambda$-algebra surjection $\Lambda[x_1, \ldots, x_s] \to k$
and denote $\mathfrak m'$ the kernel.
By the universal property of polynomial rings we may lift this
to a $\Lambda$-algebra map $\Lambda[x_1, \ldots, x_s] \to R$.
We add some variables (i.e., we increase $s$ a bit) mapping to generators
of $\mathfrak m_R$. Having done this we see that
$\Lambda[x_1, \ldots, x_s] \to R/\mathfrak m_R^2$ is surjective.
Then we see that
\begin{equation}
\label{equation-surjection}
P = \Lambda[x_1, \ldots, x_s]_{\mathfrak m'}^\wedge \longrightarrow R
\end{equation}
is a surjective map of Noetherian complete local rings, see for example
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-surjective-cotangent-space}.

\medskip\noindent
Choose lifts $a_i \in P$ of $\overline{a}_i$ we found above.
Choose generators $b_1, \ldots, b_r \in P$ for the kernel of
(\ref{equation-surjection}).
Choose $c_{ji} \in P$ such that
$$
f_j(a_1, \ldots, a_u) = \sum c_{ji} b_i
$$
in $P$ which is possible by the choices made so far. Choose generators
$$
k_1, \ldots, k_t \in
\Ker(P^{\oplus r} \xrightarrow{(b_1, \ldots, b_r)} P)
$$
and write $k_i = (k_{i1}, \ldots, k_{ir})$ and $K = (k_{ij})$
so that
$$
P^{\oplus t} \xrightarrow{K}
P^{\oplus r} \xrightarrow{(b_1, \ldots, b_r)}
P \to R \to 0
$$
is an exact sequence of $P$-modules. In particular we have
$\sum k_{ij} b_j = 0$. After possibly increasing $N$ we may
assume $N - 1$ works in the Artin-Rees lemma for the first two maps of this
exact sequence (see More on Algebra, Section
\ref{more-algebra-section-artin-rees} for terminology).

\medskip\noindent
By assumption $\mathcal{O}_{S, s} = \Lambda_{\Lambda \cap \mathfrak m'}$ is
a G-ring. Hence by More on Algebra, Proposition
\ref{more-algebra-proposition-finite-type-over-G-ring}
the ring $\Lambda[x_1, \ldots, x_s]_{\mathfrak m'}$ is a $G$-ring.
Hence by Smoothing Ring Maps, Theorem
\ref{smoothing-theorem-approximation-property-variant}
there exist an \'etale ring map
$$
\Lambda[x_1, \ldots, x_s]_{\mathfrak m'} \to B,
$$
a maximal ideal $\mathfrak m_B$ of $B$ lying over $\mathfrak m'$, and
elements $a'_i, b'_i, c'_{ij}, k'_{ij} \in B'$ such that
\begin{enumerate}
\item $\kappa(\mathfrak m') = \kappa(\mathfrak m_B)$ which implies
that $\Lambda[x_1, \ldots, x_s]_{\mathfrak m'} \subset B_{\mathfrak m_B}
\subset P$ and $P$ is identified with the completion of $B$ at
$\mathfrak m_B$, see remark preceding Smoothing Ring Maps, Theorem
\ref{smoothing-theorem-approximation-property-variant},
\item $a_i - a'_i, b_i - b'_i, c_{ij} - c'_{ij}, k_{ij} - k'_{ij} \in
(\mathfrak m')^N P$, and
\item $f_j(a'_1, \ldots, a'_u) = \sum c'_{ji} b'_i$ and $\sum k'_{ij}b'_j = 0$.
\end{enumerate}
Set $A = B/(b'_1, \ldots, b'_r)$ and denote $\mathfrak m_A$ the
image of $\mathfrak m_B$ in $A$. (Note that $A$ is essentially of finite
type over $\Lambda$; at the end of the proof we will show how to obtain
an $A$ which is of finite type over $\Lambda$.) There is a ring map
$C \to A$ sending $y_i \mapsto a'_i$ because the $a'_i$ satisfy
the desired equations modulo $(b'_1, \ldots, b'_r)$.
Note that $A/\mathfrak m_A^N = R/\mathfrak m_R^N$ as quotients of
$P = B^\wedge$ by property (2) above. Set $x_A = x_C|_{\Spec(A)}$.
Since the maps
$$
C \to A \to A/\mathfrak m_A^N \cong R/\mathfrak m_R^N
\quad\text{and}\quad
C \to R \to R/\mathfrak m_R^N
$$
are equal we see that $x_A$ and $x$ agree modulo $\mathfrak m_R^N$
via the isomorphism $A/\mathfrak m_A^N = R/\mathfrak m_R^N$. At this
point we have shown properties (1) -- (5) of the statement of the lemma.
To see (6) note that
$$
P^{\oplus t} \xrightarrow{K}
P^{\oplus r} \xrightarrow{(b_1, \ldots, b_r)}
P
\quad\text{and}\quad
P^{\oplus t} \xrightarrow{K'}
P^{\oplus r} \xrightarrow{(b'_1, \ldots, b'_r)}
P
$$
are two complexes of $P$-modules which are congruent modulo
$(\mathfrak m')^N$ with the first one being exact. By our choice of $N$
above we see from
More on Algebra, Lemma \ref{more-algebra-lemma-approximate-complex-graded}
that $R = P/(b_1, \ldots, b_r)$ and
$P/(b'_1, \ldots, b'_r) = B^\wedge/(b'_1, \ldots, b'_r) = A^\wedge$
have isomorphic associated graded algebras, which is what we wanted to show.

\medskip\noindent
This last paragraph of the proof serves to clean up the issue that $A$ is
essentially of finite type over $S$ and not yet of finite type.
The construction above gives $A = B/(b'_1, \ldots, b'_r)$ and
$\mathfrak m_A \subset A$ with $B$ \'etale over
$\Lambda[x_1, \ldots, x_s]_{\mathfrak m'}$. Hence $A$ is of finite
type over the Noetherian ring $\Lambda[x_1, \ldots, x_s]_{\mathfrak m'}$.
Thus we can write $A = (A_0)_{\mathfrak m'}$ for some finite type
$\Lambda[x_1, \ldots, x_n]$ algebra $A_0$. Then
$A = \colim (A_0)_f$ where
$f \in \Lambda[x_1, \ldots, x_n] \setminus \mathfrak m'$, see
Algebra, Lemma \ref{algebra-lemma-localization-colimit}.
Because $p : \mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving on
objects, we see that
$x_A$ comes from some object $x_{(A_0)_f}$ over $\Spec((A_0)_f)$ for
an $f$ as above. After replacing $A$ by $(A_0)_f$ and $x_A$ by
$x_{(A_0)_f}$ and $\mathfrak m_A$ by $(A_0)_f \cap \mathfrak m_A$
the proof is finished.
\end{proof}





\section{Limit preserving}
\label{section-limits}

\noindent
The morphism $p : \mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving
on objects, as defined in Criteria for Representability, Section
\ref{criteria-section-limit-preserving}, if the functor of the definition
below is essentially surjective. However, the example
in Examples, Section \ref{examples-section-limit-preserving}
shows that this isn't equivalent to being limit preserving.

\begin{definition}
\label{definition-limit-preserving}
Let $S$ be a scheme. Let $\mathcal{X}$ be a category fibred in groupoids
over $(\Sch/S)_{fppf}$. We say $\mathcal{X}$ is {\it limit preserving}
if for every affine scheme $T$ over $S$ which is a limit $T = \lim T_i$
of a directed inverse system of affine schemes $T_i$ over $S$, we have
an equivalence
$$
\colim \mathcal{X}_{T_i} \longrightarrow \mathcal{X}_T
$$
of fibre categories.
\end{definition}

\noindent
We spell out what this means. First, given objects $x, y$ of $\mathcal{X}$
over $T_i$ we should have
$$
\Mor_{\mathcal{X}_T}(x|_T, y|_T) =
\colim_{i' \geq i} \Mor_{\mathcal{X}_{T_{i'}}}(x|_{T_{i'}}, y|_{T_{i'}})
$$
and second every object of $\mathcal{X}_T$ is isomorphic to the restriction
of an object over $T_i$ for some $i$. Note that the first condition means
that the presheaves $\mathit{Isom}_\mathcal{X}(x, y)$ (see
Stacks, Definition \ref{stacks-definition-mor-presheaf})
are limit preserving.

\begin{lemma}
\label{lemma-fibre-product-limit-preserving}
Let $S$ be a scheme. Let $p : \mathcal{X} \to \mathcal{Y}$ and
$q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$.
\begin{enumerate}
\item If $\mathcal{X} \to (\Sch/S)_{fppf}$ and
$\mathcal{Z} \to (\Sch/S)_{fppf}$ are limit preserving on objects and
$\mathcal{Y}$ is limit preserving, then
$\mathcal{X} \times_\mathcal{Y} \mathcal{Z} \to (\Sch/S)_{fppf}$ is
limit preserving on objects.
\item If $\mathcal{X}$, $\mathcal{Y}$,
and $\mathcal{Z}$ are limit preserving, then so
is $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is formal. Proof of (1). Let $T = \lim_{i \in I} T_i$ be the directed
limit of affine schemes $T_i$ over $S$. We will prove that the functor
$\colim \mathcal{X}_{T_i} \to \mathcal{X}_T$ is essentially surjective.
Recall that an object of the fibre product over $T$ is a quadruple
$(T, x, z, \alpha)$ where $x$ is an object of $\mathcal{X}$ lying over $T$,
$z$ is an object of $\mathcal{Z}$ lying over $T$, and
$\alpha : p(x) \to q(z)$ is a morphism in the fibre category of
$\mathcal{Y}$ over $T$. By assumption on $\mathcal{X}$ and $\mathcal{Z}$
we can find an $i$ and objects $x_i$ and $z_i$ over $T_i$ such that
$x_i|_T \cong T$ and $z_i|_T \cong z$. Then $\alpha$ corresponds to
an isomorphism $p(x_i)|_T \to q(z_i)|_T$ which comes from an isomorphism
$\alpha_{i'} : p(x_i)|_{T_{i'}} \to q(z_i)|_{T_{i'}}$ by our assumption on
$\mathcal{Y}$. After replacing $i$ by $i'$, $x_i$ by $x_i|_{T_{i'}}$, and
$z_i$ by $z_i|_{T_{i'}}$ we see that $(T_i, x_i, z_i, \alpha_i)$
is an object of the fibre product over $T_i$ which restricts to
an object isomorphic to $(T, x, z, \alpha)$ over $T$ as desired.

\medskip\noindent
We omit the arguments showing that $\colim \mathcal{X}_{T_i} \to \mathcal{X}_T$
is fully faithful in (2).
\end{proof}

\begin{lemma}
\label{lemma-limit-preserving-algebraic-space}
Let $S$ be a scheme. Let $\mathcal{X}$ be an algebraic stack over $S$.
Then the following are equivalent
\begin{enumerate}
\item $\mathcal{X}$ is a stack in setoids and
$\mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving on objects,
\item $\mathcal{X}$ is a stack in setoids and limit preserving,
\item $\mathcal{X}$ is representable by an algebraic space
locally of finite presentation.
\end{enumerate}
\end{lemma}

\begin{proof}
Under each of the three assumptions $\mathcal{X}$ is representable
by an algebraic space $X$ over $S$, see Algebraic Stacks, Proposition
\ref{algebraic-proposition-algebraic-stack-no-automorphisms}.
It is clear that (1) and (2) are equivalent as a functor between
setoids is an equivalence if and only if it is surjective on isomorphism
classes. Finally, (1) and (3) are equivalent by
Limits of Spaces, Proposition
\ref{spaces-limits-proposition-characterize-locally-finite-presentation}.
\end{proof}

\begin{lemma}
\label{lemma-diagonal}
Let $S$ be a scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume
$\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is
representable by algebraic spaces and $\mathcal{X}$ is limit preserving.
Then $\Delta$ is locally of finite type.
\end{lemma}

\begin{proof}
We apply Criteria for Representability, Lemma
\ref{criteria-lemma-check-property-limit-preserving}.
Let $V$ be an affine scheme $V$ locally of finite presentation over $S$
and let $\theta$ be an object of $\mathcal{X} \times \mathcal{X}$
over $V$. Let $F_\theta$ be an algebraic space representing
$\mathcal{X} \times_{\Delta, \mathcal{X} \times \mathcal{X}, \theta}
(\Sch/V)_{fppf}$ and let $f_\theta : F_\theta \to V$ be the canonical morphism
(see Algebraic Stacks, Section
\ref{algebraic-section-morphisms-representable-by-algebraic-spaces}).
It suffices to show that
$F_\theta \to V$ has the corresponding properties. By
Lemmas \ref{lemma-fibre-product-limit-preserving} and
\ref{lemma-limit-preserving-algebraic-space}
we see that $F_\theta \to S$ is locally of finite presentation.
It follows that $F_\theta \to V$ is locally of finite type
by Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-permanence-finite-type}.
\end{proof}






\section{Versality}
\label{section-versality}

\noindent
In the previous section we explained how to approximate objects over
complete local rings by algebraic objects. But in order to show that
a stack $\mathcal{X}$ is an algebraic stack, we need to find smooth
$1$-morphisms from schemes towards $\mathcal{X}$. Since we are not going
to assume a priori that $\mathcal{X}$ has a representable diagonal, we
cannot even speak about smooth morphisms towards $\mathcal{X}$. Instead,
borrowing terminology from deformation theory, we will introduce versal
objects.

\begin{definition}
\label{definition-versal-formal-object}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Let $\xi = (R, \xi_n, f_n)$ be a formal object. Set $k = R/\mathfrak m$ and
$x_0 = \xi_1$. We will say that $\xi$ is {\it versal} if $\xi$
as a formal object of $\mathcal{F}_{\mathcal{X}, k, x_0}$
(Remark \ref{remark-formal-objects-match}) is versal in the sense
of Formal Deformation Theory, Definition \ref{formal-defos-definition-versal}.
\end{definition}

\noindent
We briefly spell out what this means. With notation as in the definition,
suppose given morphisms $\xi_1 = x_0 \to y \to z$ of $\mathcal{X}$ lying over
closed immersions
$\Spec(k) \to \Spec(A) \to \Spec(B)$
where $A, B$ are Artinian local rings with residue field $k$.
Suppose given an $n \geq 1$ and a commutative diagram
$$
\vcenter{
\xymatrix{
& y \ar[ld] \\
\xi_n & \xi_1 \ar[u] \ar[l]
}
}
\quad\text{lying over}\quad
\vcenter{
\xymatrix{
& \Spec(A) \ar[ld] \\
\Spec(R/\mathfrak m^n) & \Spec(k) \ar[u] \ar[l]
}
}
$$
Versality means that for any data as above
there exists an $m \geq n$ and a commutative diagram
$$
\vcenter{
\xymatrix{
& & z \ar[lldd] \\
& & y \ar[ld] \ar[u] \\
\xi_m & \xi_n \ar[l] & \xi_1 \ar[u] \ar[l]
}
}
\quad\text{lying over}
\vcenter{
\xymatrix{
& & \Spec(B) \ar[lldd] \\
& & \Spec(A) \ar[ld] \ar[u] \\
\Spec(R/\mathfrak m^m) &
\Spec(R/\mathfrak m^n) \ar[l] &
\Spec(k) \ar[u] \ar[l]
}
}
$$
Please compare with Formal Deformation Theory, Remark
\ref{formal-defos-remark-versal-object}.

\medskip\noindent
Let $S$ be a locally Noetherian scheme. Let $U$ be a scheme over $S$
with structure morphism $U \to S$ locally of finite type. Let
$u_0 \in U$ be a finite type point of $U$, see
Morphisms, Definition \ref{morphisms-definition-finite-type-point}.
Set $k = \kappa(u_0)$.
Note that the composition $\Spec(k) \to S$ is also of finite type,
see Morphisms, Lemma \ref{morphisms-lemma-composition-finite-type}.
Let $p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Let $x$ be an object of $\mathcal{X}$ which lies over $U$. Denote $x_0$
the pullback of $x$ by $u_0$. By the $2$-Yoneda lemma $x$ corresponds
to a $1$-morphism
$$
x : (\Sch/U)_{fppf} \longrightarrow \mathcal{X},
$$
see Algebraic Stacks, Section \ref{algebraic-section-2-yoneda}. We obtain a
morphism of predeformation categories
\begin{equation}
\label{equation-hat-x}
\hat x :
\mathcal{F}_{(\Sch/U)_{fppf}, k, u_0}
\longrightarrow
\mathcal{F}_{\mathcal{X}, k, x_0},
\end{equation}
over $\mathcal{C}_\Lambda$ see (\ref{equation-functoriality}).

\begin{definition}
\label{definition-versal}
Let $S$ be a locally Noetherian scheme.
Let $\mathcal{X}$ be fibred in groupoids over $(\Sch/S)_{fppf}$.
Let $U$ be a scheme locally of finite type over $S$.
Let $x$ be an object of $\mathcal{X}$ lying over $U$.
Let $u_0$ be finite type point of $U$.
We say $x$ is {\it versal} at $u_0$ if the morphism $\hat x$
(\ref{equation-hat-x}) is smooth, see Formal Deformation Theory, Definition
\ref{formal-defos-definition-smooth-morphism}.
\end{definition}

\noindent
This definition matches our notion of versality for formal objects of
$\mathcal{X}$.

\begin{lemma}
\label{lemma-versality-matches}
With notation as in Definition \ref{definition-versal}.
Let $R = \mathcal{O}_{U, u_0}^\wedge$.
Let $\xi$ be the formal object of $\mathcal{X}$
over $R$ associated to $x|_{\Spec(R)}$, see (\ref{equation-approximation}).
Then
$$
x\text{ is versal at }u_0
\Leftrightarrow
\xi\text{ is versal}
$$
\end{lemma}

\begin{proof}
Observe that $\mathcal{O}_{U, u_0}$ is a Noetherian local $S$-algebra
with residue field $k$. Hence $R = \mathcal{O}_{U, u_0}^\wedge$ is an object of
$\mathcal{C}_\Lambda^\wedge$, see Formal Deformation Theory, Definition
\ref{formal-defos-definition-completion-CLambda}.
Recall that $\xi$ is versal if
$\underline{\xi} : \underline{R}|_{\mathcal{C}_\Lambda} \to
\mathcal{F}_{\mathcal{X}, k, x_0}$
is smooth and $x$ is versal at $u_0$ if
$\hat x : \mathcal{F}_{(\Sch/U)_{fppf}, k, u_0}
\to \mathcal{F}_{\mathcal{X}, k, x_0}$ is smooth.
There is an identification of predeformation categories
$$
\underline{R}|_{\mathcal{C}_\Lambda}
=
\mathcal{F}_{(\Sch/U)_{fppf}, k, u_0},
$$
see Formal Deformation Theory, Remark
\ref{formal-defos-remark-formal-objects-yoneda} for notation.
Namely, given an Artinian local $S$-algebra $A$ with residue field
identified with $k$ we have
$$
\Mor_{\mathcal{C}_\Lambda^\wedge}(R, A) =
\{\varphi \in \Mor_S(\Spec(A), U) \mid \varphi|_{\Spec(k)} = u_0\}
$$
Unwinding the definitions the reader verifies that the resulting map
$$
\underline{R}|_{\mathcal{C}_\Lambda} =
\mathcal{F}_{(\Sch/U)_{fppf}, k, u_0}
\xrightarrow{\hat x}
\mathcal{F}_{\mathcal{X}, k, x_0},
$$
is equal to $\underline{\xi}$ and we see that the lemma is true.
\end{proof}

\noindent
Here is a sanity check.

\begin{lemma}
\label{lemma-versal-implies-smooth}
Let $S$ be a locally Noetherian scheme. Let $f : U \to V$
be a morphism of schemes locally of finite type over $S$.
Let $u_0 \in U$ be a finite type point. The following are equivalent
\begin{enumerate}
\item $f$ is smooth at $u_0$,
\item $f$ viewed as an object of $(\Sch/V)_{fppf}$ over $U$ is
versal at $u_0$.
\end{enumerate}
\end{lemma}

\begin{proof}
This is a restatement of More on Morphisms, Lemma
\ref{more-morphisms-lemma-lifting-along-artinian-at-point}.
\end{proof}

\noindent
It turns out that this notion is well behaved with respect to field
extensions.

\begin{lemma}
\label{lemma-versal-change-of-field}
Let $S$, $\mathcal{X}$, $U$, $x$, $u_0$ be as in
Definition \ref{definition-versal}. Let $l$ be a field and let
$u_{l, 0} : \Spec(l) \to U$ be a morphism with image $u_0$ such that
$l/k = \kappa(u_0)$ is finite. Set $x_{l, 0} = x_0|_{\Spec(l)}$.
If $\mathcal{X}$ satisfies (RS) and $x$ is versal at $u_0$, then
$$
\mathcal{F}_{(\Sch/U)_{fppf}, l, u_{l, 0}}
\longrightarrow
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
$$
is smooth.
\end{lemma}

\begin{proof}
Note that $(\Sch/U)_{fppf}$ satisfies (RS) by
Lemma \ref{lemma-algebraic-stack-RS}.
Hence the functor of the lemma is the functor
$$
(\mathcal{F}_{(\Sch/U)_{fppf}, k , u_0})_{l/k}
\longrightarrow
(\mathcal{F}_{\mathcal{X}, k , x_0})_{l/k}
$$
associated to $\hat x$, see Lemma \ref{lemma-change-of-field}.
Hence the lemma follows from
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-change-of-fields-smooth}.
\end{proof}

\noindent
The following lemma is another sanity check. It more or less
signifies that if $x$ is versal at $u_0$ as in
Definition \ref{definition-versal},
then $x$ viewed as a morphism from $U$ to $\mathcal{X}$ is
smooth whenever we make a base change by a scheme.

\begin{lemma}
\label{lemma-base-change-versal}
Let $S$, $\mathcal{X}$, $U$, $x$, $u_0$ be as in
Definition \ref{definition-versal}. Assume
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is representable by algebraic spaces,
\item $\Delta$ is locally of finite type
(for example if $\mathcal{X}$ is limit preserving), and
\item $\mathcal{X}$ has (RS).
\end{enumerate}
Let $V$ be a scheme locally of finite type over $S$
and let $y$ be an object of $\mathcal{X}$ over $V$.
Form the $2$-fibre product
$$
\xymatrix{
\mathcal{Z} \ar[r] \ar[d] & (\Sch/U)_{fppf} \ar[d]^x \\
(\Sch/V)_{fppf} \ar[r]^y & \mathcal{X}
}
$$
Let $Z$ be the algebraic space representing $\mathcal{Z}$
and let $z_0 \in |Z|$ be a finite type point lying over $u_0$.
If $x$ is versal at $u_0$, then
the morphism $Z \to V$ is smooth at $z_0$.
\end{lemma}

\begin{proof}
(The parenthetical remark in the statement holds by
Lemma \ref{lemma-diagonal}.)
Observe that $Z$ exists by assumption (1) and Algebraic Stacks, Lemma
\ref{algebraic-lemma-representable-diagonal}. By assumption (2) we see that
$Z \to V \times_S U$ is locally of finite type.
Choose a scheme $W$, a closed point $w_0 \in W$, and
an \'etale morphism $W \to Z$ mapping $w_0$ to $z_0$, see
Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-finite-type-point}.
Then $W$ is locally of finite type over $S$ and
$w_0$ is a finite type point of $W$.
Let $l = \kappa(z_0)$. Denote $z_{l, 0}$, $v_{l, 0}$,
$u_{l, 0}$, and $x_{l, 0}$ the objects of
$\mathcal{Z}$, $(\Sch/V)_{fppf}$, $(\Sch/U)_{fppf}$,
and $\mathcal{X}$ over $\Spec(l)$ obtained by pullback to $\Spec(l) = w_0$.
Consider
$$
\xymatrix{
\mathcal{F}_{(\Sch/W)_{fppf}, l, w_0} \ar[r] &
\mathcal{F}_{\mathcal{Z}, l, z_{l, 0}} \ar[d] \ar[r] &
\mathcal{F}_{(\Sch/U)_{fppf}, l, u_{l, 0}} \ar[d] \\
& \mathcal{F}_{(\Sch/V)_{fppf}, l, v_{l, 0}} \ar[r] &
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}
}
$$
By Lemma \ref{lemma-fibre-product-deformation-categories}
the square is a fibre product of predeformation categories.
By Lemma \ref{lemma-versal-change-of-field}
we see that the right vertical arrow is smooth.
By Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-smooth-properties}
the left vertical arrow is smooth.
By Lemma \ref{lemma-formally-smooth-on-deformation-categories}
we see that the left horizontal arrow is smooth.
We conclude that the map
$$
\mathcal{F}_{(\Sch/W)_{fppf}, l, w_0} \to
\mathcal{F}_{(\Sch/V)_{fppf}, l, v_{l, 0}}
$$
is smooth by Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-smooth-properties}.
Thus we conclude that $W \to V$ is smooth at $w_0$ by
More on Morphisms, Lemma
\ref{more-morphisms-lemma-lifting-along-artinian-at-point}.
This exactly means that $Z \to V$ is smooth at $z_0$
and the proof is complete.
\end{proof}

\noindent
We restate the approximation result in terms of
versal objects.

\begin{lemma}
\label{lemma-approximate-versal}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Let $\xi = (R, \xi_n, f_n)$ be a formal object of $\mathcal{X}$ with
$\xi_1$ lying over $\Spec(k) \to S$ with image $s \in S$. Assume
\begin{enumerate}
\item $\xi$ is versal,
\item $\xi$ is effective,
\item $\mathcal{O}_{S, s}$ is a G-ring, and
\item $p : \mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving on objects.
\end{enumerate}
Then there exist a morphism of finite type $U \to S$, a finite type
point $u_0 \in U$ with residue field $k$, and an object $x$ of $\mathcal{X}$
over $U$ such that $x$ is versal at $u_0$ and such that
$x|_{\Spec(\mathcal{O}_{U, u_0}/\mathfrak m_{u_0}^n)} \cong \xi_n$.
\end{lemma}

\begin{proof}
Choose an object $x_R$ of $\mathcal{X}$ lying over $\Spec(R)$ whose associated
formal object is $\xi$. Let $N = 2$ and apply Lemma \ref{lemma-approximate}.
We obtain $A, \mathfrak m_A, x_A, \ldots$.
Let $\eta = (A^\wedge, \eta_n, g_n)$ be the formal object associated to
$x_A|_{\Spec(A^\wedge)}$. We have a diagram
$$
\vcenter{
\xymatrix{
& \eta \ar[d] \\
\xi \ar[r] \ar@{..>}[ru] & \xi_2 = \eta_2
}
}
\quad\text{lying over}\quad
\vcenter{
\xymatrix{
& A^\wedge \ar[d] \\
R \ar[r] \ar@{..>}[ru] & R/\mathfrak m_R^2 = A/\mathfrak m_A^2
}
}
$$
The versality of $\xi$ means exactly that we can find the
dotted arrows in the diagrams, because we can successively find
morphisms $\xi \to \eta_3$, $\xi \to \eta_4$, and so on by
Formal Deformation Theory, Remark \ref{formal-defos-remark-versal-object}.
The corresponding ring map $R \to A^\wedge$ is surjective by
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-surjective-cotangent-space}.
On the other hand, we have
$\dim_k \mathfrak m_R^n/\mathfrak m_R^{n + 1} =
\dim_k \mathfrak m_A^n/\mathfrak m_A^{n + 1}$ for all $n$ by construction.
Hence $R/\mathfrak m_R^n$ and $A/\mathfrak m_A^n$ have the same (finite)
length as $\Lambda$-modules by additivity of length and
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-length}.
It follows that $R/\mathfrak m_R^n \to A/\mathfrak m_A^n$ is an isomorphism
for all $n$, hence $R \to A^\wedge$ is an isomorphism. Thus $\eta$ is
isomorphic to a versal object, hence versal itself. By
Lemma \ref{lemma-versality-matches}
we conclude that $x_A$ is versal at the point $u_0$ of
$U = \Spec(A)$ corresponding to $\mathfrak m_A$.
\end{proof}

\begin{example}
\label{example-approximate-versal-implies}
In this example we show that the local ring $\mathcal{O}_{S, s}$ has to be
a G-ring in order for the result of Lemma \ref{lemma-approximate-versal} to
be true. Namely, let $\Lambda$ be a Noetherian ring and let $\mathfrak m$
be a maximal ideal of $\Lambda$. Set $R = \Lambda_\mathfrak m^\wedge$. Let
$\Lambda \to C \to R$ be a factorization with $C$ of finite type over
$\Lambda$. Set $S = \Spec(\Lambda)$, $U = S \setminus \{\mathfrak m\}$, and
$S' = U \amalg \Spec(C)$. Consider the functor
$F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$ defined by the rule
$$
F(T) = 
\left\{
\begin{matrix}
* & \text{if }T \to S\text{ factors through }S' \\
\emptyset & \text{else}
\end{matrix}
\right.
$$
Let $\mathcal{X} = \mathcal{S}_F$ is the category fibred in sets associated
to $F$, see Algebraic Stacks, Section \ref{algebraic-section-split}.
Then $\mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving on objects and
there exists an effective, versal formal object $\xi$ over $R$.
Hence if the conclusion of Lemma \ref{lemma-approximate-versal} holds
for $\mathcal{X}$, then there exists a finite type ring map $\Lambda \to A$
and a maximal ideal $\mathfrak m_A$ lying over $\mathfrak m$ such that
\begin{enumerate}
\item $\kappa(\mathfrak m) = \kappa(\mathfrak m_A)$,
\item $\Lambda \to A$ and $\mathfrak m_A$ satisfy condition (4) of
Algebra, Lemma \ref{algebra-lemma-smooth-test-artinian}, and
\item there exists a $\Lambda$-algebra map $C \to A$.
\end{enumerate}
Thus $\Lambda \to A$ is smooth at $\mathfrak m_A$ by the lemma cited.
Slicing $A$ we may assume that $\Lambda \to A$ is \'etale at
$\mathfrak m_A$, see for example
More on Morphisms, Lemma \ref{more-morphisms-lemma-slice-smooth}
or argue directly. Write $C = \Lambda[y_1, \ldots, y_n]/(f_1, \ldots, f_m)$.
Then $C \to R$ corresponds to a solution in $R$ of the system of equations
$f_1 = \ldots = f_m = 0$, see Smoothing Ring Maps, Section
\ref{smoothing-section-approximation-G-rings}.
Thus if the conclusion of
Lemma \ref{lemma-approximate-versal} holds for every $\mathcal{X}$ as
above, then a system of equations which has a solution in $R$ has a
solution in the henselization of $\Lambda_{\mathfrak m}$.
In other words, the approximation property holds for
$\Lambda_{\mathfrak m}^h$. This implies that $\Lambda_{\mathfrak m}^h$
is a G-ring (insert future reference here; see also discussion in
Smoothing Ring Maps, Section \ref{smoothing-section-introduction})
which in turn implies that $\Lambda_{\mathfrak m}$ is a G-ring.
\end{example}






\section{Openness of versality}
\label{section-openness-versality}

\noindent
Next, we come to openness of versality.

\begin{definition}
\label{definition-openness-versality}
Let $S$ be a locally Noetherian scheme.
\begin{enumerate}
\item Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. We say $\mathcal{X}$ satisfies
{\it openness of versality} if given a scheme $U$ locally of finite type
over $S$, an object $x$ of $\mathcal{X}$ over $U$, and a finite type point
$u_0 \in U$ such that $x$ is versal at $u_0$, then there exists an open
neighbourhood $u_0 \in U' \subset U$ such that $x$ is versal at every finite
type point of $U'$.
\item Let $f : \mathcal{X} \to \mathcal{Y}$ be a $1$-morphism of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. We say $f$ satisfies
{\it openness of versality} if given a scheme $U$ locally of finite type
over $S$, an object $y$ of $\mathcal{Y}$ over $U$, openness
of versality holds for
$(\Sch/U)_{fppf} \times_\mathcal{Y} \mathcal{X}$.
\end{enumerate}
\end{definition}

\noindent
Openness of versality is often the hardest to check. The following example
shows that requiring this is necessary however.

\begin{example}
\label{example-versality}
Let $k$ be a field and set $\Lambda = k[s, t]$. Consider the functor
$F : \Lambda\text{-algebras} \longrightarrow \textit{Sets}$
defined by the rule
$$
F(A) =
\left\{
\begin{matrix}
* & \text{if there exist }f_1, \ldots, f_n \in A\text{ such that } \\
  & A = (s, t, f_1, \ldots, f_n)\text{ and } f_i s = 0\ \forall i \\
\emptyset & \text{else}
\end{matrix}
\right.
$$
Geometrically $F(A) = *$ means there exists a quasi-compact open neighbourhood
$W$ of $V(s, t) \subset \Spec(A)$ such that $s|_W = 0$.
Let $\mathcal{X} \subset (\Sch/\Spec(\Lambda))_{fppf}$ be the full
subcategory consisting of schemes $T$ which have an affine open covering
$T = \bigcup \Spec(A_j)$ with $F(A_j) = *$ for all $j$. Then $\mathcal{X}$
satisfies [0], [1], [2], [3], and [4] but not [5]. Namely, over
$U = \Spec(k[s, t]/(s))$
there exists an object $x$ which is versal at $u_0 = (s, t)$ but not
at any other point. Details omitted.
\end{example}

\noindent
Let $S$ be a locally Noetherian scheme.
Let $f : \mathcal{X} \to \mathcal{Y}$ be a $1$-morphism of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. Consider the following property
\begin{equation}
\label{equation-smooth}
\begin{matrix}
\text{for all fields }k\text{ of finite type over }S
\text{ and all }x_0 \in \Ob(\mathcal{X}_{\Spec(k)})\text{ the}\\
\text{map }
\mathcal{F}_{\mathcal{X}, k, x_0} \to \mathcal{F}_{\mathcal{Y}, k, f(x_0)}
\text{ of predeformation categories is smooth}
\end{matrix}
\end{equation}
We formulate some lemmas around this concept. First we link it with
(openness of) versality.

\begin{lemma}
\label{lemma-versal-smooth}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Let $U$ be a scheme locally
of finite type over $S$. Let $x$ be an object of $\mathcal{X}$ over $U$.
Assume that $x$ is versal at every finite type point of $U$ and that
$\mathcal{X}$ satisfies (RS). Then $x : (\Sch/U)_{fppf} \to \mathcal{X}$
satisfies (\ref{equation-smooth}).
\end{lemma}

\begin{proof}
Let $\Spec(l) \to U$ be a morphism with $l$ of finite type over $S$.
Then the image $u_0 \in U$ is a finite type point of $U$ and
$l/\kappa(u_0)$ is a finite extension, see discussion in
Morphisms, Section \ref{morphisms-section-points-finite-type}.
Hence we see that
$\mathcal{F}_{(\Sch/U)_{fppf}, l, u_{l, 0}} \to
\mathcal{F}_{\mathcal{X}, l, x_{l, 0}}$
is smooth by Lemma \ref{lemma-versal-change-of-field}.
\end{proof}

\begin{lemma}
\label{lemma-composition-smooth}
Let $S$ be a locally Noetherian scheme. Let $f : \mathcal{X} \to \mathcal{Y}$
and $g : \mathcal{Y} \to \mathcal{Z}$ be composable $1$-morphisms of
categories fibred in groupoids over $(\Sch/S)_{fppf}$. If $f$ and $g$
satisfy (\ref{equation-smooth}) so does $g \circ f$.
\end{lemma}

\begin{proof}
This follows formally from Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-smooth-properties}.
\end{proof}

\begin{lemma}
\label{lemma-base-change-smooth}
Let $S$ be a locally Noetherian scheme. Let $f : \mathcal{X} \to \mathcal{Y}$
and $\mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of
categories fibred in groupoids over $(\Sch/S)_{fppf}$. If $f$
satisfies (\ref{equation-smooth}) so does the projection
$\mathcal{X} \times_\mathcal{Y} \mathcal{Z} \to \mathcal{Z}$.
\end{lemma}

\begin{proof}
Follows immediately from
Lemma \ref{lemma-fibre-product-deformation-categories}
and
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-smooth-properties}.
\end{proof}

\begin{lemma}
\label{lemma-smooth-smooth}
Let $S$ be a locally Noetherian scheme. Let $f : \mathcal{X} \to \mathcal{Y}$
be a $1$-morphisms of categories fibred in groupoids over $(\Sch/S)_{fppf}$.
If $f$ is formally smooth on objects, then $f$ satisfies
(\ref{equation-smooth}). If $f$ is representable by algebraic spaces
and smooth, then $f$ satisfies (\ref{equation-smooth}).
\end{lemma}

\begin{proof}
A reformulation of Lemma \ref{lemma-formally-smooth-on-deformation-categories}.
\end{proof}

\begin{lemma}
\label{lemma-implies-smooth}
Let $S$ be a locally Noetherian scheme. Let $f : \mathcal{X} \to \mathcal{Y}$
be a $1$-morphism of categories fibred in groupoids over $(\Sch/S)_{fppf}$.
Assume
\begin{enumerate}
\item $f$ is representable by algebraic spaces,
\item $f$ satisfies (\ref{equation-smooth}),
\item $\mathcal{X} \to (\Sch/S)_{fppf}$ is limit preserving on objects, and
\item $\mathcal{Y}$ is limit preserving.
\end{enumerate}
Then $f$ is smooth.
\end{lemma}

\begin{proof}
The key ingredient of the proof is More on Morphisms, Lemma
\ref{more-morphisms-lemma-lifting-along-artinian-at-point}
which (almost) says that a morphism of schemes of finite type over $S$
satisfying (\ref{equation-smooth}) is a smooth morphism. The other
arguments of the proof are essentially bookkeeping.

\medskip\noindent
Let $V$ be a scheme over $S$ and let $y$ be an object of $\mathcal{Y}$ over
$V$. Let $Z$ be an algebraic space representing the $2$-fibre product
$\mathcal{Z} = \mathcal{X} \times_{f, \mathcal{X}, y} (\Sch/V)_{fppf}$.
We have to show that the projection morphism $Z \to V$ is smooth, see
Algebraic Stacks, Definition
\ref{algebraic-definition-relative-representable-property}.
In fact, it suffices to do this when $V$ is an affine scheme
locally of finite presentation over $S$, see
Criteria for Representability, Lemma
\ref{criteria-lemma-check-property-limit-preserving}.
Then $(\Sch/V)_{fppf}$ is limit preserving by
Lemma \ref{lemma-limit-preserving-algebraic-space}.
Hence $Z \to S$ is locally of finite presentation by
Lemmas \ref{lemma-fibre-product-limit-preserving} and
\ref{lemma-limit-preserving-algebraic-space}.
Choose a scheme $W$ and a surjective \'etale morphism $W \to Z$.
Then $W$ is locally of finite presentation over $S$.

\medskip\noindent
Since $f$ satisfies (\ref{equation-smooth}) we see that so does
$\mathcal{Z} \to (\Sch/V)_{fppf}$, see Lemma \ref{lemma-base-change-smooth}.
Next, we see that $(\Sch/W)_{fppf} \to \mathcal{Z}$ satisfies
(\ref{equation-smooth}) by Lemma \ref{lemma-smooth-smooth}.
Thus the composition
$$
(\Sch/W)_{fppf} \to \mathcal{Z} \to (\Sch/V)_{fppf}
$$
satisfies (\ref{equation-smooth}) by Lemma \ref{lemma-composition-smooth}.
More on Morphisms, Lemma
\ref{more-morphisms-lemma-lifting-along-artinian-at-point}
shows that the composition $W \to Z \to V$ is smooth at every finite type
point $w_0$ of $W$. Since the smooth locus is open we conclude
that $W \to V$ is a smooth morphism of schemes by
Morphisms, Lemma \ref{morphisms-lemma-enough-finite-type-points}.
Thus we conclude that $Z \to V$ is a smooth morphism
of algebraic spaces by definition.
\end{proof}

\noindent
The lemma below is how we will use openness of versality.

\begin{lemma}
\label{lemma-get-smooth}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Let $k$ be a finite type field over $S$ and let $x_0$ be an object of
$\mathcal{X}$ over $\Spec(k)$ with image $s \in S$. Assume
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is
representable by algebraic spaces,
\item $\mathcal{X}$ satisfies axioms [1], [2], [3] (see
Section \ref{section-axioms}),
\item every formal object of $\mathcal{X}$ is effective,
\item openness of versality holds for $\mathcal{X}$, and
\item $\mathcal{O}_{S, s}$ is a G-ring.
\end{enumerate}
Then there exist a morphism of finite type $U \to S$ and an object
$x$ of $\mathcal{X}$ over $U$ such that
$$
x : (\Sch/U)_{fppf} \longrightarrow \mathcal{X}
$$
is smooth and such that there exists a finite type point $u_0 \in U$
whose residue field is $k$ and such that $x|_{u_0} \cong x_0$.
\end{lemma}

\begin{proof}
By axiom [2], Lemma \ref{lemma-deformation-category}, and
Remark \ref{remark-deformation-category-implies}
we see that $\mathcal{F}_{\mathcal{X}, k, x_0}$ satisfies (S1) and (S2).
Since also the tangent space has finite dimension by axiom [3]
we deduce from Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-versal-object-existence}
that $\mathcal{F}_{\mathcal{X}, k, x_0}$ has a versal formal object $\xi$.
Assumption (3) says $\xi$ is effective. By axiom [1] and
Lemma \ref{lemma-approximate-versal}
there exists a morphism of finite type $U \to S$, an object $x$ of
$\mathcal{X}$ over $U$, and a finite type point $u_0$ of $U$ with residue
field $k$ such that $x$ is versal at $u_0$ and such that
$x|_{\Spec(k)} \cong x_0$. By openness of versality we may shrink
$U$ and assume that $x$ is versal at every finite type point of $U$.
We claim that
$$
x : (\Sch/U)_{fppf} \longrightarrow \mathcal{X}
$$
is smooth which proves the lemma. Namely, by Lemma \ref{lemma-versal-smooth}
$x$ satisfies (\ref{equation-smooth})
whereupon Lemma \ref{lemma-implies-smooth}
finishes the proof.
\end{proof}






\section{Axioms}
\label{section-axioms}

\noindent
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Here are the axioms we will consider on $\mathcal{X}$.
\begin{enumerate}
\item[{[-1]}] a set theoretic condition\footnote{The condition is the
following: the supremum of all the cardinalities
$|\Ob(\mathcal{X}_{\Spec(k)})/\cong|$ and
$|\text{Arrows}(\mathcal{X}_{\Spec(k)})|$ where $k$ runs over the finite
type fields over $S$ is $\leq$ than the size of some
object of $(\Sch/S)_{fppf}$.} to be ignored by
readers who are not interested in set theoretical issues,
\item[{[0]}] $\mathcal{X}$ is a stack in groupoids for the \'etale topology,
\item[{[1]}] $\mathcal{X}$ is limit preserving,
\item[{[2]}] $\mathcal{X}$ satisfies the Rim-Schlessinger condition (RS),
\item[{[3]}] the spaces $T\mathcal{F}_{\mathcal{X}, k, x_0}$ and
$\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0})$
are finite dimensional
for every $k$ and $x_0$, see
(\ref{equation-tangent-space}) and
(\ref{equation-infinitesimal-automorphisms}),
\item[{[4]}] the functor (\ref{equation-approximation}) is an equivalence,
\item[{[5]}] $\mathcal{X}$ and
$\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ satisfy
openness of versality.
\end{enumerate}










\section{Axioms for functors}
\label{section-axioms-functors}

\noindent
Let $S$ be a scheme. Let $F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$ be a
functor. Denote $\mathcal{X} = \mathcal{S}_F$ the category fibred in sets
associated to $F$, see Algebraic Stacks, Section \ref{algebraic-section-split}.
In this section we provide a translation between the material above
as it applies to $\mathcal{X}$, to statements about $F$.

\medskip\noindent
Let $S$ be a locally Noetherian scheme. Let
$F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$ be a functor. Let $k$ be
a field of finite type over $S$. Let $x_0 \in F(\Spec(k))$.
The associated predeformation category (\ref{equation-predeformation-category})
corresponds to the functor
$$
F_{k, x_0} : \mathcal{C}_\Lambda \longrightarrow \textit{Sets},
\quad
A \longmapsto \{x \in F(\Spec(A)) \mid x|_{\Spec(k)} = x_0 \}.
$$
Recall that we do not distinguish between
categories cofibred in sets over $\mathcal{C}_\Lambda$
and functor $\mathcal{C}_\Lambda \to \textit{Sets}$,
see Formal Deformation Theory, Remarks
\ref{formal-defos-remarks-cofibered-groupoids}
(\ref{formal-defos-item-convention-cofibered-sets}).
Given a transformation of functors $a : F \to G$, setting
$y_0 = a(x_0)$ we obtain a morphism
$$
F_{k, x_0} \longrightarrow G_{k, y_0}
$$
see (\ref{equation-functoriality}).
Lemma \ref{lemma-formally-smooth-on-deformation-categories} tells us that if
$a : F \to G$ is formally smooth (in the sense of
More on Morphisms of Spaces, Definition
\ref{spaces-more-morphisms-definition-formally-smooth-etale-unramified}), then
$F_{k, x_0} \longrightarrow G_{k, y_0}$ is smooth as
in Formal Deformation Theory, Remark
\ref{formal-defos-remark-compare-smooth-schlessinger}.

\medskip\noindent
Lemma \ref{lemma-pushout} says that if $Y' = Y \amalg_X X'$ in the
category of schemes over $S$ where $X \to X'$ is a thickening and
$X \to Y$ is affine, then the map
$$
F(Y \amalg_X X') \to F(Y) \times_{F(X)} F(X')
$$
is a bijection, provided that $F$ is an algebraic space.
We say a general functor $F$ satisfies the {\it Rim-Schlessinger condition}
or we say $F$ {\it satisfies (RS)} if given any
pushout $Y' = Y \amalg_X X'$ where $Y, X, X'$ are spectra of Artinian
local rings of finite type over $S$, then
$$
F(Y \amalg_X X') \to F(Y) \times_{F(X)} F(X')
$$
is a bijection. Thus every algebraic space satisfies (RS).

\medskip\noindent
Lemma \ref{lemma-deformation-category} says that
given a functor $F$ which satisfies (RS), then all $F_{k, x_0}$
are deformation functors as in
Formal Deformation Theory, Definition
\ref{formal-defos-definition-deformation-category}, i.e., they satisfy
(RS) as in
Formal Deformation Theory, Remark
\ref{formal-defos-remark-compare-schlessinger-H4}.
In particular the tangent space
$$
TF_{k, x_0} = \{x \in F(\Spec(k[\epsilon])) \mid x|_{\Spec(k)} = x_0\}
$$
has the structure of a $k$-vector space by Formal Deformation Theory,
Lemma \ref{formal-defos-lemma-tangent-space-vector-space}.

\medskip\noindent
Lemma \ref{lemma-finite-dimension} says that an algebraic space $F$
locally of finite type over $S$ gives rise to deformation functors
$F_{k, x_0}$ with finite dimensional tangent spaces $TF_{k, x_0}$.

\medskip\noindent
A {\it formal object}\footnote{This is what Artin calls a formal deformation.}
$\xi = (R, \xi_n)$ of $F$ consists of a Noetherian
complete local $S$-algebra $R$ whose residue field is of finite type
over $S$, together with elements $\xi_n \in F(\Spec(R/\mathfrak m^n))$
such that $\xi_{n + 1}|_{\Spec(R/\mathfrak m^n)} = \xi_n$. A formal
object $\xi$ defines a formal object $\xi$ of $F_{R/\mathfrak m, \xi_1}$.
We say $\xi$ is {\it versal} if and only if it is versal in the sense of
Formal Deformation Theory, Definition \ref{formal-defos-definition-versal}.
A formal object $\xi = (R, \xi_n)$ is called {\it effective}
if there exists an $x \in F(\Spec(R))$ such that
$\xi_n = x|_{\Spec(R/\mathfrak m^n)}$ for all $n \geq 1$.
Lemma \ref{lemma-effective} says that if $F$ is an algebraic space,
then every formal object is effective.

\medskip\noindent
Let $U$ be a scheme locally of finite type over $S$ and let $x \in F(U)$.
Let $u_0 \in U$ be a finite type point. We say that $x$ is versal at $u_0$
if and only if
$\xi = (\mathcal{O}_{U, u_0}^\wedge,
x|_{\Spec(\mathcal{O}_{U, u_0}/\mathfrak m_{u_0}^n)})$
is a versal formal object in the sense described above.

\medskip\noindent
Let $S$ be a locally Noetherian scheme. Let
$F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$ be a functor.
Here are the axioms we will consider on $F$.
\begin{enumerate}
\item[{[-1]}]  a set theoretic condition\footnote{The condition is the
following: the supremum of all the cardinalities
$|F(\Spec(k))|$ where $k$ runs over the finite
type fields over $S$ is $\leq$ than the size of some
object of $(\Sch/S)_{fppf}$.} to be ignored by
readers who are not interested in set theoretical issues,
\item[{[0]}] $F$ is a sheaf for the \'etale topology,
\item[{[1]}] $F$ is limit preserving,
\item[{[2]}] $F$ satisfies the Rim-Schlessinger condition (RS),
\item[{[3]}] every tangent space $TF_{k, x_0}$ is finite dimensional,
\item[{[4]}] every formal object is effective,
\item[{[5]}] $F$ satisfies openness of versality.
\end{enumerate}
Here {\it limit preserving} is the notion defined in
Limits of Spaces, Definition
\ref{spaces-limits-definition-locally-finite-presentation} and
{\it openness of versality} means the following: Given a scheme $U$
locally of finite type over $S$, given $x \in F(U)$, and given
a finite type point $u_0 \in U$ such that $x$ is versal at $u_0$,
then there exists an open neighbourhood $u_0 \in U' \subset U$
such that $x$ is versal at every finite type point of $U'$.






\section{Algebraic spaces}
\label{section-algebraic-spaces}

\noindent
The following is our first main result on algebraic spaces.

\begin{proposition}
\label{proposition-spaces-diagonal-representable}
Let $S$ be a locally Noetherian scheme. Let
$F : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$ be a functor. Assume that
\begin{enumerate}
\item $\Delta : F \to F \times F$ is representable by algebraic spaces,
\item $F$ satisfies axioms [-1], [0], [1], [2], [3], [4], [5]
(see Section \ref{section-axioms-functors}), and
\item $\mathcal{O}_{S, s}$ is a G-ring for all finite type points $s$ of $S$.
\end{enumerate}
Then $F$ is an algebraic space.
\end{proposition}

\begin{proof}
Lemma \ref{lemma-get-smooth} applies to $F$. Using this we
choose, for every finite type field $k$ over $S$ and $x_0 \in F(\Spec(k))$,
an affine scheme $U_{k, x_0}$ of finite type over $S$ and a smooth morphism
$U_{k, x_0} \to F$ such that there exists a finite type point
$u_{k, x_0} \in U_{k, x_0}$ with residue field $k$ such that $x_0$
is the image of $u_{k, x_0}$. Then
$$
U = \coprod\nolimits_{k, x_0} U_{k, x_0} \longrightarrow F
$$
is smooth\footnote{Set theoretical remark: This coproduct is (isomorphic)
to an object of $(\Sch/S)_{fppf}$ as we have a bound on the index set
by axiom [-1], see Sets, Lemma \ref{sets-lemma-what-is-in-it}.}.
To finish the proof it suffices to show this map is surjective,
see Bootstrap, Lemma \ref{bootstrap-lemma-spaces-etale-smooth-cover}
(this is where we use axiom [0]). By Criteria for Representability, Lemma
\ref{criteria-lemma-check-property-limit-preserving}
it suffices to show that $U \times_F V \to V$ is surjective for those
$V \to F$ where $V$ is an affine scheme locally of finite presentation
over $S$. Since $U \times_F V \to V$ is smooth the image is open. Hence
it suffices to show that the image of $U \times_F V \to V$ contains all
finite type points of $V$, see
Morphisms, Lemma \ref{morphisms-lemma-enough-finite-type-points}.
Let $v_0 \in V$ be a finite type point. Then $k = \kappa(v_0)$ is
a finite type field over $S$. Denote $x_0$ the composition
$\Spec(k) \xrightarrow{v_0} V \to F$. Then
$(u_{k, x_0}, v_0) : \Spec(k) \to U \times_F V$ is a point mapping to
$v_0$ and we win.
\end{proof}

\begin{lemma}
\label{lemma-monomorphism}
Let $S$ be a locally Noetherian scheme. Let $a : F \to G$ be a transformation
of functors $(\Sch/S)_{fppf}^{opp} \to \textit{Sets}$.
Assume that
\begin{enumerate}
\item $a$ is injective,
\item $F$ satisfies axioms [0], [1], [2], [4], and [5],
\item $\mathcal{O}_{S, s}$ is a G-ring for all finite type points $s$ of $S$,
\item $G$ is an algebraic space locally of finite type over $S$,
\end{enumerate}
Then $F$ is an algebraic space.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-finite-dimension} the functor $G$ satisfies [3].
As $F \to G$ is injective, we conclude that $F$ also satisfies [3].
Moreover, as $F \to G$ is injective, we see that given schemes
$U$, $V$ and morphisms $U \to F$ and $V \to F$, then
$U \times_F V = U \times_G V$. Hence $\Delta : F \to F \times F$ is
representable (by schemes) as this holds for $G$ by assumption.
Thus Proposition \ref{proposition-spaces-diagonal-representable}
applies\footnote{The set
theoretic condition [-1] holds for $F$ as it holds for $G$. Details
omitted.}.
\end{proof}












\section{Algebraic stacks}
\label{section-algebraic-stacks}

\noindent
Proposition \ref{proposition-second-diagonal-representable} is our first
main result on algebraic stacks.

\begin{lemma}
\label{lemma-diagonal-representable}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Assume that
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is representable by algebraic spaces,
\item $\mathcal{X}$ satisfies axioms [-1], [0], [1], [2], [3] (see
Section \ref{section-axioms}),
\item every formal object of $\mathcal{X}$ is effective,
\item $\mathcal{X}$ satisfies openness of versality, and
\item $\mathcal{O}_{S, s}$ is a G-ring for all finite type points $s$ of $S$.
\end{enumerate}
Then $\mathcal{X}$ is an algebraic stack.
\end{lemma}

\begin{proof}
Lemma \ref{lemma-get-smooth} applies to $\mathcal{X}$. Using this we
choose, for every finite type field $k$ over $S$ and every
isomorphism class of object $x_0 \in \Ob(\mathcal{X}_{\Spec(k)})$,
an affine scheme $U_{k, x_0}$ of finite type over $S$ and a smooth morphism
$(\Sch/U_{k, x_0})_{fppf} \to \mathcal{X}$ such that there exists a finite
type point $u_{k, x_0} \in U_{k, x_0}$ with residue field $k$ such that $x_0$
is the image of $u_{k, x_0}$. Then
$$
(\Sch/U)_{fppf} \to \mathcal{X},
\quad\text{with}\quad
U = \coprod\nolimits_{k, x_0} U_{k, x_0}
$$
is smooth\footnote{Set theoretical remark: This coproduct is (isomorphic to)
an object of $(\Sch/S)_{fppf}$ as we have a bound on the index set
by axiom [-1], see Sets, Lemma \ref{sets-lemma-what-is-in-it}.}.
To finish the proof it suffices to show this map is surjective,
see Criteria for Representability, Lemma \ref{criteria-lemma-stacks-etale}
(this is where we use axiom [0]). By Criteria for Representability, Lemma
\ref{criteria-lemma-check-property-limit-preserving}
it suffices to show that
$(\Sch/U)_{fppf} \times_\mathcal{X} (\Sch/V)_{fppf} \to (\Sch/V)_{fppf}$
is surjective for those $y : (\Sch/V)_{fppf} \to \mathcal{X}$ where
$V$ is an affine scheme locally of finite presentation
over $S$. By assumption (1) the fibre product
$(\Sch/U)_{fppf} \times_\mathcal{X} (\Sch/V)_{fppf}$ is representable
by an algebraic space $W$. Then $W \to V$ is smooth, hence the image is
open. Hence it suffices to show that the image of $W \to V$ contains all
finite type points of $V$, see
Morphisms, Lemma \ref{morphisms-lemma-enough-finite-type-points}.
Let $v_0 \in V$ be a finite type point. Then $k = \kappa(v_0)$ is
a finite type field over $S$. Denote $x_0 = y|_{\Spec(k)}$
the pullback of $y$ by $v_0$. Then $(u_{k, x_0}, v_0)$ will give
a morphism $\Spec(k) \to W$ whose composition with $W \to V$
is $v_0$ and we win.
\end{proof}

\begin{proposition}
\label{proposition-second-diagonal-representable}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}$ be a category fibred in groupoids.
Assume that
\begin{enumerate}
\item $\Delta_\Delta : \mathcal{X} \to
\mathcal{X} \times_{\mathcal{X} \times \mathcal{X}} \mathcal{X}$
is representable by algebraic spaces,
\item $\mathcal{X}$ satisfies axioms [-1], [0], [1], [2], [3], [4], and [5]
(see Section \ref{section-axioms}),
\item $\mathcal{O}_{S, s}$ is a G-ring for all finite type points $s$ of $S$.
\end{enumerate}
Then $\mathcal{X}$ is an algebraic stack.
\end{proposition}

\begin{proof}
We first prove that $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
is representable by algebraic spaces. To do this it suffices to show
that
$$
\mathcal{Y} =
\mathcal{X} \times_{\Delta, \mathcal{X} \times \mathcal{X}, y} (\Sch/V)_{fppf}
$$
is representable by an algebraic space for any affine scheme $V$ locally
of finite presentation over $S$ and object $y$ of
$\mathcal{X} \times \mathcal{X}$ over $V$, see
Criteria for Representability, Lemma
\ref{criteria-lemma-check-representable-limit-preserving}\footnote{The
set theoretic condition in Criteria for Representability, Lemma
\ref{criteria-lemma-check-representable-limit-preserving}
will hold: the size of the algebraic space $Y$ representing $\mathcal{Y}$ is
suitably bounded. Namely, $Y \to S$ will be locally of finite type and $Y$
will satisfy axiom [-1]. Details omitted.}.
Observe that $\mathcal{Y}$ is fibred in setoids
(Stacks, Lemma \ref{stacks-lemma-isom-as-2-fibre-product})
and let $Y : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$,
$T \mapsto \Ob(\mathcal{Y}_T)/\cong$ be the functor of isomorphism
classes. We will apply
Proposition \ref{proposition-spaces-diagonal-representable}
to see that $Y$ is an algebraic space.

\medskip\noindent
Note that
$\Delta_\mathcal{Y} : \mathcal{Y} \to \mathcal{Y} \times \mathcal{Y}$
(and hence also $Y \to Y \times Y$)
is representable by algebraic spaces by condition (1) and
Criteria for Representability, Lemma \ref{criteria-lemma-second-diagonal}.
Observe that $Y$ is a sheaf for the \'etale topology by
Stacks, Lemmas \ref{stacks-lemma-stack-in-setoids-characterize} and
\ref{stacks-lemma-2-fibre-product-gives-stack-in-setoids}, i.e.,
axiom [0] holds. Also $Y$ is limit preserving by
Lemma \ref{lemma-fibre-product-limit-preserving}, i.e., we have [1].
Note that $Y$ has (RS), i.e., axiom [2] holds, by
Lemmas \ref{lemma-algebraic-stack-RS} and
\ref{lemma-fibre-product-RS}. Axiom [3] for $Y$ follows
from Lemmas \ref{lemma-finite-dimension} and
\ref{lemma-fibre-product-tangent-spaces}.
Axiom [4] follows from Lemmas \ref{lemma-effective} and
\ref{lemma-fibre-product-effective}.
Axiom [5] for $Y$ follows directly from openness of versality
for $\Delta_\mathcal{X}$ which is part of axiom [5] for $\mathcal{X}$.
Thus all the assumptions of
Proposition \ref{proposition-spaces-diagonal-representable}
are satisfied and $Y$ is an algebraic space.

\medskip\noindent
At this point it follows from Lemma \ref{lemma-diagonal-representable}
that $\mathcal{X}$ is an algebraic stack.
\end{proof}





\section{Strong Rim-Schlessinger}
\label{section-RS-star}

\noindent
In the rest of this chapter the following strictly stronger version
of the Rim-Schlessinger conditions will play an important role.

\begin{definition}
\label{definition-RS-star}
Let $S$ be a scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. We say $\mathcal{X}$
satisfies {\it condition (RS*)} if given a fibre product diagram
$$
\xymatrix{
B' \ar[r] & B \\
A' = A \times_B B' \ar[u] \ar[r] & A \ar[u]
}
$$
of $S$-algebras, with $B' \to B$ surjective with square zero kernel,
the functor of fibre categories
$$
\mathcal{X}_{\Spec(A')}
\longrightarrow
\mathcal{X}_{\Spec(A)} \times_{\mathcal{X}_{\Spec(B)}} \mathcal{X}_{\Spec(B')}
$$
is an equivalence of categories.
\end{definition}

\noindent
We make some observations:
with $A \to B \leftarrow B'$ as in Definition \ref{definition-RS-star}
\begin{enumerate}
\item we have $\Spec(A') = \Spec(A) \amalg_{\Spec(B)} \Spec(B')$
in the category of schemes, see
More on Morphisms, Lemma \ref{more-morphisms-lemma-pushout-along-thickening},
and
\item if $\mathcal{X}$ is an algebraic stack, then $\mathcal{X}$ satisfies
(RS*) by Lemma \ref{lemma-algebraic-stack-RS-star}.
\end{enumerate}
If $S$ is locally Noetherian, then
\begin{enumerate}
\item[(3)] if $A$, $B$, $B'$ are of finite type over $S$ and
$B$ is finite over $A$, then $A'$ is of finite type over
$S$\footnote{If $\Spec(A)$ maps into an affine open of $S$
this follows from
More on Algebra, Lemma \ref{more-algebra-lemma-fibre-product-finite-type}.
The general case follows using
More on Algebra, Lemma \ref{more-algebra-lemma-diagram-localize}.}, and
\item[(4)] if $\mathcal{X}$ satisfies (RS*), then $\mathcal{X}$ satisfies (RS)
because (RS) covers exactly those cases of (RS*) where
$A$, $B$, $B'$ are Artinian local.
\end{enumerate}

\begin{lemma}
\label{lemma-algebraic-stack-RS-star}
Let $\mathcal{X}$ be an algebraic stack over a base $S$.
Then $\mathcal{X}$ satisfies (RS*).
\end{lemma}

\begin{proof}
This is implied by Lemma \ref{lemma-pushout}, see
remarks following Definition \ref{definition-RS-star}.
\end{proof}

\begin{lemma}
\label{lemma-fibre-product-RS-star}
Let $S$ be a scheme. Let $p : \mathcal{X} \to \mathcal{Y}$ and
$q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. If $\mathcal{X}$, $\mathcal{Y}$,
and $\mathcal{Z}$ satisfy (RS*), then so
does $\mathcal{X} \times_\mathcal{Y} \mathcal{Z}$.
\end{lemma}

\begin{proof}
The proof is exactly the same as the proof of
Lemma \ref{lemma-fibre-product-RS}.
\end{proof}








\section{Versality and generalizations}
\label{section-generalize-versality}

\noindent
We prove that versality is preserved under generalizations
for stacks which have (RS*) and are limit preserving.
We suggest skipping this section on a first reading.

\begin{lemma}
\label{lemma-single-point}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$ having (RS*).
Let $x$ be an object of $\mathcal{X}$ over an affine scheme $U$
of finite type over $S$. Let $u \in U$ be a finite type point such that
$x$ is not versal at $u$. Then there exists a morphism $x \to y$
of $\mathcal{X}$ lying over $U \to T$ satisfying
\begin{enumerate}
\item the morphism $U \to T$ is a first order thickening,
\item we have a short exact sequence
$$
0 \to \kappa(u) \to \mathcal{O}_T \to \mathcal{O}_U \to 0
$$
\item there does {\bf not} exist a pair $(W, \alpha)$
consisting of an open neighbourhood $W \subset T$ of $u$
and a morphism $\beta : y|_W \to x$ such that the composition
$$
x|_{U \cap W} \xrightarrow{\text{restriction of }x \to y}
y|_W \xrightarrow{\beta} x
$$
is the canonical morphism $x|_{U \cap W} \to x$.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $R = \mathcal{O}_{U, u}^\wedge$. Let $k = \kappa(u)$
be the residue field of $R$. Let $\xi$ be the formal object
of $\mathcal{X}$ over $R$ associated to $x$. Since $x$ is not
versal at $u$, we see that $\xi$ is not versal, see
Lemma \ref{lemma-versality-matches}. By the discussion following
Definition \ref{definition-versal-formal-object}
this means we can find
morphisms $\xi_1 \to x_A \to x_B$ of $\mathcal{X}$ lying over
closed immersions $\Spec(k) \to \Spec(A) \to \Spec(B)$
where $A, B$ are Artinian local rings with residue field $k$,
an $n \geq 1$ and a commutative diagram
$$
\vcenter{
\xymatrix{
& x_A \ar[ld] \\
\xi_n & \xi_1 \ar[u] \ar[l]
}
}
\quad\text{lying over}\quad
\vcenter{
\xymatrix{
& \Spec(A) \ar[ld] \\
\Spec(R/\mathfrak m^n) & \Spec(k) \ar[u] \ar[l]
}
}
$$
such that there does {\bf not} exist an $m \geq n$ and a commutative diagram
$$
\vcenter{
\xymatrix{
& & x_B \ar[lldd] \\
& & x_A \ar[ld] \ar[u] \\
\xi_m & \xi_n \ar[l] & \xi_1 \ar[u] \ar[l]
}
}
\quad\text{lying over}
\vcenter{
\xymatrix{
& & \Spec(B) \ar[lldd] \\
& & \Spec(A) \ar[ld] \ar[u] \\
\Spec(R/\mathfrak m^m) &
\Spec(R/\mathfrak m^n) \ar[l] &
\Spec(k) \ar[u] \ar[l]
}
}
$$
We may moreover assume that $B \to A$ is a small
extension, i.e., that the kernel $I$ of the surjection $B \to A$
is isomorphic to $k$ as an $A$-module.
This follows from Formal Deformation Theory, Remark
\ref{formal-defos-remark-versal-object}.
Then we simply define
$$
T = U \amalg_{\Spec(A)} \Spec(B)
$$
By property (RS*) we find $y$ over $T$ whose restriction to
$\Spec(B)$ is $x_B$ and whose restriction to $U$ is $x$
(this gives the arrow $x \to y$ lying over $U \to T$).
To finish the proof we verify conditions (1), (2), and (3).

\medskip\noindent
By the construction of the pushout we have a commutative diagram
$$
\xymatrix{
0 \ar[r] &
I \ar[r] &
B \ar[r] &
A \ar[r] &
0 \\
0 \ar[r] &
I \ar[r] \ar[u] &
\Gamma(T, \mathcal{O}_T) \ar[r] \ar[u] &
\Gamma(U, \mathcal{O}_U) \ar[r] \ar[u] &
0
}
$$
with exact rows. This immediately proves (1) and (2).
To finish the proof we will argue by contradiction.
Assume we have a pair $(W, \beta)$ as in (3).
Since $\Spec(B) \to T$ factors through $W$ we get the morphism
$$
x_B \to y|_W \xrightarrow{\beta} x
$$
Since $B$ is Artinian local with residue field $k = \kappa(u)$
we see that $x_B \to x$ lies over a morphism $\Spec(B) \to U$
which factors through $\Spec(\mathcal{O}_{U, u}/\mathfrak m_u^m)$
for some $m \geq n$. In other words, $x_B \to x$ factors
through $\xi_m$ giving a map $x_B \to \xi_m$.
The compatibility condition on the morphism $\alpha$
in condition (3) translates into the condition that
$$
\xymatrix{
x_B \ar[d] & x_A \ar[d] \ar[l] \\
\xi_m & \xi_n \ar[l]
}
$$
is commutative. This gives the contradiction we were looking for.
\end{proof}

\begin{lemma}
\label{lemma-generalization-versality}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is
representable by algebraic spaces,
\item $\mathcal{X}$ has (RS*),
\item $\mathcal{X}$ is limit preserving.
\end{enumerate}
Let $x$ be an object of $\mathcal{X}$ over a scheme $U$ of finite type over
$S$. Let $u \leadsto u_0$ be a specialization of finite type points of $U$
such that $x$ is versal at $u_0$. Then $x$ is versal at $u$.
\end{lemma}

\begin{proof}
After shrinking $U$ we may assume $U$ is affine and $U$ maps into an
affine open $\Spec(\Lambda)$ of $S$. If $x$ is not versal at $u$ then
we may pick $x \to y$ lying over $U \to T$ as in
Lemma \ref{lemma-single-point}. Write $U = \Spec(R_0)$ and $T = \Spec(R)$.
The morphism $U \to T$ corresponds to a surjective ring map
$R \to R_0$ whose kernel is an ideal of square zero.
By assumption (3) we get that $y$ comes from an object $x'$ over
$U' = \Spec(R')$ for some finite type $\Lambda$-subalgebra
$R' \subset R$. After increasing $R'$ we may and do assume that
$R' \to R_0$ is surjective, so that $U \subset U'$ is a first order thickening.
Thus we now have
$$
x \to y \to x'
\text{ lying over }
U \to T \to U'
$$
By assumption (1) there is an algebraic space $Z$ over $S$ representing
$$
(\Sch/U)_{fppf} \times_{x, \mathcal{X}, x'} (\Sch/U')_{fppf}
$$
see Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}.
By construction of $2$-fibre products, a $V$-valued point of $Z$
corresponds to a triple $(a, a', \alpha)$ consisting of morphisms
$a : V \to U$, $a' : V \to U'$ and a morphism $\alpha : a^*x \to (a')^*x'$.
We obtain a commutative diagram
$$
\xymatrix{
U \ar[rd] \ar[rdd] \ar[rrd] \\
& Z \ar[r]_{p'} \ar[d]^p & U' \ar[d] \\
& U \ar[r] & S
}
$$
The morphism $i : U \to Z$ comes the isomorphism $x \to x'|_U$.
Let $z_0 = i(u_0) \in Z$. By Lemma \ref{lemma-base-change-versal}
we see that $Z \to U'$ is smooth at $z_0$. After replacing $U$ by an
affine open neighbourhood of $u_0$, replacing $U'$ by the corresponding
open, and replacing $Z$ by the intersection of the inverse images
of these opens by $p$ and $p'$, we reach the situation where
$Z \to U'$ is smooth along $i(U)$. Since $u \leadsto u_0$ the point
$u$ is in this open. Condition (3) of Lemma \ref{lemma-single-point}
is clearly preserved by shrinking $U$ (all of the schemes $U$, $T$, $U'$
have the same underlying topological space).
Since $U \to U'$ is a first order thickening of affine schemes,
we can choose a morphism $i' : U' \to Z$
such that $p' \circ i' = \text{id}_{U'}$ and
whose restriction to $U$ is $i$
(More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-smooth-formally-smooth}).
Pulling back the universal morphism $p^*x \to (p')^*x'$ by $i'$
we obtain a morphism
$$
x' \to x
$$
lying over $p \circ i' : U' \to U$ such that the composition
$$
x \to x' \to x
$$
is the identity. Recall that we have $y \to x'$ lying over
the morphism $T \to U'$. Composing we get a morphism
$y \to x$ whose existence contradicts condition
(3) of Lemma \ref{lemma-single-point}.
This contradiction finishes the proof.
\end{proof}






\section{Strong formal effectiveness}
\label{section-strong-formal-effectiveness}

\noindent
In this section we demonstrate how a strong version of effectiveness
of formal objects implies openness of versality. The proof of
\cite[Theorem 1.1]{Bhatt-Algebraize} shows that quasi-compact and
quasi-separated algebraic spaces satisfy the strong formal effectiveness
discussed in Remark \ref{remark-strong-effectiveness}. In addition, the
theory we develop is nonempty: we use it later to show openness of versality
for the stack of coherent sheaves and for moduli of complexes, see
Quot, Theorems
\ref{quot-theorem-coherent-algebraic-general} and
\ref{quot-theorem-complexes-algebraic}.

\begin{lemma}
\label{lemma-infinite-sequence-pre}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$ having (RS*).
Let $x$ be an object of
$\mathcal{X}$ over an affine scheme $U$ of finite type over $S$.
Let $u_n \in U$, $n \geq 1$ be finite type points such that
(a) there are no specializations $u_n \leadsto u_m$ for $n \not = m$, and
(b) $x$ is not versal at $u_n$ for all $n$. Then there exist morphisms
$$
x \to x_1 \to x_2 \to \ldots
\quad\text{in }\mathcal{X}\text{ lying over }\quad
U \to U_1 \to U_2 \to \ldots
$$
over $S$ such that
\begin{enumerate}
\item for each $n$ the morphism $U \to U_n$ is a first order
thickening,
\item for each $n$ we have a short exact sequence
$$
0 \to \kappa(u_n) \to \mathcal{O}_{U_n} \to \mathcal{O}_{U_{n - 1}} \to 0
$$
with $U_0 = U$ for $n = 1$,
\item for each $n$ there does {\bf not} exist a pair $(W, \alpha)$
consisting of an open neighbourhood $W \subset U_n$ of $u_n$
and a morphism $\alpha : x_n|_W \to x$
such that the composition
$$
x|_{U \cap W} \xrightarrow{\text{restriction of }x \to x_n}
x_n|_W \xrightarrow{\alpha} x
$$
is the canonical morphism $x|_{U \cap W} \to x$.
\end{enumerate}
\end{lemma}

\begin{proof}
Since there are no specializations among the points $u_n$ (and in
particular the $u_n$ are pairwise distinct), for every $n$
we can find an open $U' \subset U$
such that $u_n \in U'$ and $u_i \not \in U'$ for $i = 1, \ldots, n - 1$.
By Lemma \ref{lemma-single-point} for each $n \geq 1$ we can find
$$
x \to y_n
\quad\text{in }\mathcal{X}\text{ lying over}\quad
U \to T_n
$$
such that
\begin{enumerate}
\item the morphism $U \to T_n$ is a first order thickening,
\item we have a short exact sequence
$$
0 \to \kappa(u_n) \to \mathcal{O}_{T_n} \to \mathcal{O}_U \to 0
$$
\item there does {\bf not} exist a pair $(W, \alpha)$
consisting of an open neighbourhood $W \subset T_n$ of $u_n$
and a morphism $\beta : y_n|_W \to x$ such that the composition
$$
x|_{U \cap W} \xrightarrow{\text{restriction of }x \to y_n}
y_n|_W \xrightarrow{\beta} x
$$
is the canonical morphism $x|_{U \cap W} \to x$.
\end{enumerate}
Thus we can define inductively
$$
U_1 = T_1, \quad
U_{n + 1} = U_n \amalg_U T_{n + 1}
$$
Setting $x_1 = y_1$ and using (RS*) we find inductively
$x_{n + 1}$ over $U_{n + 1}$ restricting to
$x_n$ over $U_n$ and $y_{n + 1}$ over $T_{n + 1}$.
Property (1) for $U \to U_n$ follows from the construction
of the pushout in More on Morphisms, Lemma
\ref{more-morphisms-lemma-pushout-along-thickening}.
Property (2) for $U_n$ similarly follows from
property (2) for $T_n$ by the construction of the pushout.
After shrinking to an open neighbourhood $U'$ of $u_n$
as discussed above, property (3) for $(U_n, x_n)$ follows from property (3)
for $(T_n, y_n)$ simply because the corresponding open subschemes
of $T_n$ and $U_n$ are isomorphic. Some details omitted.
\end{proof}

\begin{remark}[Strong effectiveness]
\label{remark-strong-effectiveness}
Let $S$ be a locally Noetherian scheme.
Let $\mathcal{X}$ be a category fibred in groupoids over $(\Sch/S)_{fppf}$.
Assume we have
\begin{enumerate}
\item an affine open $\Spec(\Lambda) \subset S$,
\item an inverse system $(R_n)$ of $\Lambda$-algebras
with surjective transition maps whose kernels are locally nilpotent,
\item a system $(\xi_n)$ of objects of $\mathcal{X}$ lying
over the system $(\Spec(R_n))$.
\end{enumerate}
In this situation, set $R = \lim R_n$. We say that
$(\xi_n)$ is {\it effective} if there exists an object
$\xi$ of $\mathcal{X}$ over $\Spec(R)$ whose restriction
to $\Spec(R_n)$ gives the system $(\xi_n)$.
\end{remark}

\noindent
It is not the case that every algebraic stack $\mathcal{X}$
over $S$ satisfies a strong effectiveness axiom of the form:
every system $(\xi_n)$ as in Remark \ref{remark-strong-effectiveness}
is effective. An example is given in
Examples, Section \ref{examples-section-non-formal-effectiveness}.

\begin{lemma}
\label{lemma-SGE-implies-openness-versality}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is
representable by algebraic spaces,
\item $\mathcal{X}$ has (RS*),
\item $\mathcal{X}$ is limit preserving,
\item systems $(\xi_n)$ as in Remark \ref{remark-strong-effectiveness}
where $\Ker(R_m \to R_n)$ is an ideal of square zero for all $m \geq n$
are effective.
\end{enumerate}
Then $\mathcal{X}$ satisfies openness of versality.
\end{lemma}

\begin{proof}
Choose a scheme $U$ locally of finite type over $S$,
a finite type point $u_0$ of $U$, and an object $x$ of $\mathcal{X}$
over $U$ such that $x$ is versal at $u_0$. After shrinking
$U$ we may assume $U$ is affine and $U$ maps into an affine open
$\Spec(\Lambda)$ of $S$. Let $E \subset U$ be the set of finite type
points $u$ such that $x$ is not versal at $u$. By
Lemma \ref{lemma-generalization-versality}
if $u \in E$ then $u_0$ is not a specialization of $u$.
If openness of versality does not hold, then $u_0$ is in the closure
$\overline{E}$ of $E$. By
Properties, Lemma \ref{properties-lemma-countable-dense-subset}
we may choose a countable subset $E' \subset E$ with the same closure
as $E$. By Properties, Lemma \ref{properties-lemma-maximal-points}
we may assume there are no specializations among the points of $E'$.
Observe that $E'$ has to be (countably) infinite as $u_0$
isn't the specialization of any point of $E'$ as pointed out above.
Thus we can write $E' = \{u_1, u_2, u_3, \ldots\}$, there
are no specializations among the $u_i$, and $u_0$ is in the closure
of $E'$.

\medskip\noindent
Choose $x \to x_1 \to x_2 \to \ldots$ lying over
$U \to U_1 \to U_2 \to \ldots$ as in Lemma \ref{lemma-infinite-sequence-pre}.
Write $U_n = \Spec(R_n)$ and $U = \Spec(R_0)$.
Set $R = \lim R_n$. Observe that $R \to R_0$ is surjective
with kernel an ideal of square zero. By assumption (4)
we get $\xi$ over $\Spec(R)$ whose base change to $R_n$ is $x_n$.
By assumption (3) we get that $\xi$ comes from an object $\xi'$ over
$U' = \Spec(R')$ for some finite type $\Lambda$-subalgebra
$R' \subset R$. After increasing $R'$ we may and do assume that
$R' \to R_0$ is surjective, so that $U \subset U'$ is a first order thickening.
Thus we now have
$$
x \to x_1 \to x_2 \to \ldots \to \xi'
\text{ lying over }
U \to U_1 \to U_2 \to \ldots \to U'
$$
By assumption (1) there is an algebraic space $Z$ over $S$ representing
$$
(\Sch/U)_{fppf} \times_{x, \mathcal{X}, \xi'} (\Sch/U')_{fppf}
$$
see Algebraic Stacks, Lemma \ref{algebraic-lemma-representable-diagonal}.
By construction of $2$-fibre products, a $T$-valued point of $Z$
corresponds to a triple $(a, a', \alpha)$ consisting of morphisms
$a : T \to U$, $a' : T \to U'$ and a morphism $\alpha : a^*x \to (a')^*\xi'$.
We obtain a commutative diagram
$$
\xymatrix{
U \ar[rd] \ar[rdd] \ar[rrd] \\
& Z \ar[r]_{p'} \ar[d]^p & U' \ar[d] \\
& U \ar[r] & S
}
$$
The morphism $i : U \to Z$ comes the isomorphism $x \to \xi'|_U$.
Let $z_0 = i(u_0) \in Z$. By Lemma \ref{lemma-base-change-versal}
we see that $Z \to U'$ is smooth at $z_0$. After replacing $U$ by an
affine open neighbourhood of $u_0$, replacing $U'$ by the corresponding
open, and replacing $Z$ by the intersection of the inverse images
of these opens by $p$ and $p'$, we reach the situation where
$Z \to U'$ is smooth along $i(U)$. Note that this
also involves replacing $u_n$ by a subsequence, namely
by those indices such that $u_n$ is in the open. Moreover, condition
(3) of Lemma \ref{lemma-infinite-sequence-pre}
is clearly preserved by shrinking $U$
(all of the schemes $U$, $U_n$, $U'$ have the same underlying
topological space).
Since $U \to U'$ is a first order thickening of affine schemes,
we can choose a morphism $i' : U' \to Z$
such that $p' \circ i' = \text{id}_{U'}$ and
whose restriction to $U$ is $i$
(More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-smooth-formally-smooth}).
Pulling back the universal morphism
$p^*x \to (p')^*\xi'$ by $i'$ we obtain a morphism
$$
\xi' \to x
$$
lying over $p \circ i' : U' \to U$ such that the composition
$$
x \to \xi' \to x
$$
is the identity. Recall that we have $x_1 \to \xi'$ lying over
the morphism $U_1 \to U'$. Composing we get a morphism
$x_1 \to x$ whose existence contradicts condition
(3) of Lemma \ref{lemma-infinite-sequence-pre}.
This contradiction finishes the proof.
\end{proof}

\begin{remark}
\label{remark-trade-openness-versality-diagonal-with-strong-effectiveness}
There is a way to deduce openness of versality of the diagonal
of an category fibred in groupoids from a strong formal effectiveness
axiom.
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume
\begin{enumerate}
\item $\Delta_\Delta : \mathcal{X} \to
\mathcal{X} \times_{\mathcal{X} \times \mathcal{X}} \mathcal{X}$
is representable by algebraic spaces,
\item $\mathcal{X}$ has (RS*),
\item $\mathcal{X}$ is limit preserving,
\item given an inverse system $(R_n)$ of $S$-algebras
as in Remark \ref{remark-strong-effectiveness}
where $\Ker(R_m \to R_n)$ is an ideal of square zero for all $m \geq n$
the functor
$$
\mathcal{X}_{\Spec(\lim R_n)} \longrightarrow
\lim_n \mathcal{X}_{\Spec(R_n)}
$$
is fully faithful.
\end{enumerate}
Then $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$
satisfies openness of versality. This follows by applying
Lemma \ref{lemma-SGE-implies-openness-versality}
to fibre products of the form
$\mathcal{X} \times_{\Delta, \mathcal{X} \times \mathcal{X}, y}
(\Sch/V)_{fppf}$ for any affine scheme $V$ locally
of finite presentation over $S$ and object $y$ of
$\mathcal{X} \times \mathcal{X}$ over $V$.
If we ever need this, we will change this remark into
a lemma and provide a detailed proof.
\end{remark}











\section{Infinitesimal deformations}
\label{section-inf}

\noindent
In this section we discuss a generalization of the notion of the
tangent space introduced in Section \ref{section-tangent-spaces}.
To do this intelligently, we borrow some notation from
Formal Deformation Theory, Sections
\ref{formal-defos-section-tangent-spaces-functors},
\ref{formal-defos-section-lifts}, and
\ref{formal-defos-section-infinitesimal-automorphisms}.

\medskip\noindent
Let $S$ be a scheme. Let $\mathcal{X}$ be a category fibred in groupoids
over $(\Sch/S)_{fppf}$. Given a homomorphism $A' \to A$ of $S$-algebras
and an object $x$ of $\mathcal{X}$ over $\Spec(A)$ we write
$\textit{Lift}(x, A')$ for the category of lifts of $x$ to $\Spec(A')$.
An object of $\textit{Lift}(x, A')$ is a morphism $x \to x'$ of $\mathcal{X}$
lying over $\Spec(A) \to \Spec(A')$ and morphisms of $\textit{Lift}(x, A')$
are defined as commutative diagrams. The set of isomorphism classes of
$\textit{Lift}(x, A')$ is denoted $\text{Lift}(x, A')$. See
Formal Deformation Theory, Definition \ref{formal-defos-definition-lifts} and
Remark \ref{formal-defos-remark-omit-arrow}.
If $A' \to A$ is surjective with locally nilpotent kernel we call an element
$x'$ of $\text{Lift}(x, A')$ a {\it (infinitesimal) deformation} of $x$.
In this case the {\it group of infinitesimal automorphisms of $x'$ over $x$}
is the kernel
$$
\text{Inf}(x'/x) =
\Ker\left(
\text{Aut}_{\mathcal{X}_{\Spec(A')}}(x') \to
\text{Aut}_{\mathcal{X}_{\Spec(A)}}(x)\right)
$$
Note that an element of $\text{Inf}(x'/x)$ is the same thing as a lift
of $\text{id}_x$ over $\Spec(A')$ for (the category fibred in sets associated
to) $\mathit{Aut}_\mathcal{X}(x')$. Compare with
Formal Deformation Theory, Definition
\ref{formal-defos-definition-relative-infinitesimal-auts} and
Formal Deformation Theory, Remark
\ref{formal-defos-remark-infaut-lifting-equalities}.

\medskip\noindent
If $M$ is an $A$-module we denote $A[M]$ the $A$-algebra whose underlying
$A$-module is $A \oplus M$ and whose multiplication is given by
$(a, m) \cdot (a', m') = (aa', am' + a'm)$. When $M = A$ this is the ring
of dual numbers over $A$, which we denote $A[\epsilon]$ as is customary.
There is an $A$-algebra map $A[M] \to A$. The pullback of $x$ to $\Spec(A[M])$
is called the {\it trivial deformation} of $x$ to $\Spec(A[M])$.

\begin{lemma}
\label{lemma-functoriality}
Let $S$ be a scheme. Let $f : \mathcal{X} \to \mathcal{Y}$ be a $1$-morphism
of categories fibred in groupoids over $(\Sch/S)_{fppf}$. Let
$$
\xymatrix{
B' \ar[r] & B \\
A' \ar[u] \ar[r] & A \ar[u]
}
$$
be a commutative diagram of $S$-algebras. Let $x$ be an object of $\mathcal{X}$
over $\Spec(A)$, let $y$ be an object of $\mathcal{Y}$ over $\Spec(B)$,
and let $\phi : f(x)|_{\Spec(B)} \to y$ be a morphism of $\mathcal{Y}$
over $\Spec(B)$. Then there is a canonical functor
$$
\textit{Lift}(x, A') \longrightarrow \textit{Lift}(y, B')
$$
of categories of lifts induced by $f$ and $\phi$. The construction is
compatible with compositions of $1$-morphisms of categories fibred in
groupoids in an obvious manner.
\end{lemma}

\begin{proof}
This lemma proves itself.
\end{proof}

\noindent
Let $S$ be a base scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. We define a category whose objects are
pairs $(x, A' \to A)$ where
\begin{enumerate}
\item $A' \to A$ is a surjection of $S$-algebras whose kernel
is an ideal of square zero,
\item $x$ is an object of $\mathcal{X}$ lying over $\Spec(A)$.
\end{enumerate}
A morphism $(y, B' \to B) \to (x, A' \to A)$ is given by a commutative
diagram
$$
\xymatrix{
B' \ar[r] & B \\
A' \ar[u] \ar[r] & A \ar[u]
}
$$
of $S$-algebras together with a morphism $x|_{\Spec(B)} \to y$ over
$\Spec(B)$. Let us call this the category of {\it deformation situations}.

\begin{lemma}
\label{lemma-properties-lift-RS-star}
Let $S$ be a scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Assume $\mathcal{X}$ satisfies
condition (RS*). Let $A$ be an $S$-algebra and let $x$ be an object of
$\mathcal{X}$ over $\Spec(A)$.
\begin{enumerate}
\item There exists an $A$-linear functor
$\text{Inf}_x : \text{Mod}_A \to \text{Mod}_A$
such that given a deformation situation $(x, A' \to A)$ and a lift $x'$
there is an isomorphism $\text{Inf}_x(I) \to \text{Inf}(x'/x)$ where
$I = \Ker(A' \to A)$.
\item There exists an $A$-linear functor
$T_x : \text{Mod}_A \to \text{Mod}_A$
such that
\begin{enumerate}
\item given $M$ in $\text{Mod}_A$ there is a bijection
$T_x(M) \to \text{Lift}(x, A[M])$,
\item given a deformation situation $(x, A' \to A)$ there is an action
$$
T_x(I) \times \text{Lift}(x, A') \to \text{Lift}(x, A')
$$
where $I = \Ker(A' \to A)$. It is simply transitive if
$\text{Lift}(x, A') \not = \emptyset$.
\end{enumerate}
\end{enumerate}
\end{lemma}

\begin{proof}
We define $\text{Inf}_x$ as the functor
$$
\text{Mod}_A \longrightarrow \textit{Sets},\quad
M \longrightarrow
\text{Inf}(x'_M/x) = \text{Lift}(\text{id}_x, A[M])
$$
mapping $M$ to the group of infinitesimal automorphisms
of the trivial deformation $x'_M$ of $x$ to $\Spec(A[M])$
or equivalently the group of lifts of $\text{id}_x$ in
$\mathit{Aut}_\mathcal{X}(x'_M)$.
We define $T_x$ as the functor
$$
\text{Mod}_A \longrightarrow \textit{Sets},\quad
M \longrightarrow \text{Lift}(x, A[M])
$$
of isomorphism classes of infinitesimal deformations of $x$ to
$\Spec(A[M])$. We apply Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-linear-functor}
to $\text{Inf}_x$ and $T_x$. This lemma is applicable, since
(RS*) tells us that
$$
\textit{Lift}(x, A[M \times N]) =
\textit{Lift}(x, A[M]) \times \textit{Lift}(x, A[N])
$$
as categories (and trivial deformations match up too).

\medskip\noindent
Let $(x, A' \to A)$ be a deformation situation. Consider the ring map
$g : A' \times_A A' \to A[I]$ defined by the
rule $g(a_1, a_2) = \overline{a_1} \oplus a_2 - a_1$.
There is an isomorphism
$$
A' \times_A A' \longrightarrow A' \times_A A[I]
$$
given by $(a_1, a_2) \mapsto (a_1, g(a_1, a_2))$.
This isomorphism commutes with the projections to $A'$ on the first
factor, and hence with the projections to $A$. Thus applying (RS*)
twice we find equivalences of categories
\begin{align*}
\textit{Lift}(x, A') \times \textit{Lift}(x, A')
& =
\textit{Lift}(x, A' \times_A A') \\
& =
\textit{Lift}(x, A' \times_A A[I]) \\
& =
\textit{Lift}(x, A') \times \textit{Lift}(x, A[I])
\end{align*}
Using these maps and projection onto the last factor of the last product
we see that we obtain ``difference maps''
$$
\text{Inf}(x'/x) \times  \text{Inf}(x'/x)
\longrightarrow
\text{Inf}_x(I)
\quad\text{and}\quad
\text{Lift}(x, A') \times \text{Lift}(x, A')
\longrightarrow
T_x(I)
$$
These difference maps satisfy the transitivity rule
``$(x'_1 - x'_2) + (x'_2 - x'_3) = x'_1 - x'_3$'' because
$$
\xymatrix{
A' \times_A A' \times_A A'
\ar[rrrrr]_-{(a_1, a_2, a_3) \mapsto (g(a_1, a_2), g(a_2, a_3))}
\ar[rrrrrd]_{(a_1, a_2, a_3) \mapsto g(a_1, a_3)} & & & & &
A[I] \times_A A[I] = A[I \times I] \ar[d]^{+} \\
& & & & & A[I]
}
$$
is commutative. Inverting the string of equivalences above we obtain
an action which is free and transitive provided $\text{Inf}(x'/x)$,
resp.\ $\text{Lift}(x, A')$ is nonempty. Note that $\text{Inf}(x'/x)$
is always nonempty as it is a group.
\end{proof}

\begin{remark}[Functoriality]
\label{remark-functoriality}
Assumptions and notation as in Lemma \ref{lemma-properties-lift-RS-star}.
Suppose $A \to B$ is a ring map and $y = x|_{\Spec(B)}$.
Let $M \in \text{Mod}_A$, $N \in \text{Mod}_B$
and let $M \to N$ an $A$-linear map. Then there are canonical maps
$\text{Inf}_x(M) \to \text{Inf}_y(N)$ and
$T_x(M) \to T_y(N)$ simply because there is a pullback functor
$$
\textit{Lift}(x, A[M]) \to \textit{Lift}(y, B[N])
$$
coming from the ring map $A[M] \to B[N]$. Similarly, given a morphism of
deformation situations $(y, B' \to B) \to (x, A' \to A)$ we obtain a pullback
functor $\textit{Lift}(x, A') \to \textit{Lift}(y, B')$. Since the
construction of the action, the addition, and the scalar multiplication
on $\text{Inf}_x$ and $T_x$ use only morphisms in the categories of lifts
(see proof of
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-linear-functor})
we see that the constructions above are functorial. In other words we
obtain $A$-linear maps
$$
\text{Inf}_x(M) \to \text{Inf}_y(N)
\quad\text{and}\quad
T_x(M) \to T_y(N)
$$
such that the diagrams
$$
\vcenter{
\xymatrix{
\text{Inf}_y(J) \ar[r] & \text{Inf}(y'/y) \\
\text{Inf}_x(I) \ar[r] \ar[u] & \text{Inf}(x'/x) \ar[u]
}
}
\quad\text{and}\quad
\vcenter{
\xymatrix{
T_y(J) \times \text{Lift}(y, B') \ar[r] & \text{Lift}(y, B') \\
T_x(I) \times \text{Lift}(x, A') \ar[r] \ar[u] & \text{Lift}(x, A') \ar[u]
}
}
$$
commute. Here $I = \Ker(A' \to A)$, $J = \Ker(B' \to B)$,
$x'$ is a lift of $x$ to $A'$ (which may not always exist) and
$y' = x'|_{\Spec(B')}$.
\end{remark}

\begin{remark}[Automorphisms]
\label{remark-automorphisms}
Assumptions and notation as in Lemma \ref{lemma-properties-lift-RS-star}.
Let $x', x''$ be lifts of $x$ to $A'$. Then we have a composition
map
$$
\text{Inf}(x'/x) \times
\Mor_{\textit{Lift}(x, A')}(x', x'') \times \text{Inf}(x''/x)
\longrightarrow
\Mor_{\textit{Lift}(x, A')}(x', x'').
$$
Since $\textit{Lift}(x, A')$ is a groupoid, if
$\Mor_{\textit{Lift}(x, A')}(x', x'')$ is nonempty, then this defines
a simply transitive left action of $\text{Inf}(x'/x)$ on
$\Mor_{\textit{Lift}(x, A')}(x', x'')$ and a simply transitive
right action by $\text{Inf}(x''/x)$. Now the lemma says that
$\text{Inf}(x'/x) = \text{Inf}_x(I) = \text{Inf}(x''/x)$.
We claim that the two actions described above agree via these identifications.
Namely, either $x' \not \cong x''$ in which the claim is clear, or
$x' \cong x''$ and in that case we may assume that $x'' = x'$ in which
case the result follows from the fact that $\text{Inf}(x'/x)$ is
commutative. In particular, we obtain a well defined action
$$
\text{Inf}_x(I) \times \Mor_{\textit{Lift}(x, A')}(x', x'')
\longrightarrow
\Mor_{\textit{Lift}(x, A')}(x', x'')
$$
which is simply transitive as soon as $\Mor_{\textit{Lift}(x, A')}(x', x'')$
is nonempty.
\end{remark}

\begin{remark}
\label{remark-short-exact-sequence-thickenings}
Let $S$ be a scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Let $A$ be an $S$-algebra. There
is a notion of a {\it short exact sequence}
$$
(x, A_1' \to A) \to (x, A_2' \to A) \to (x, A_3' \to A)
$$
of deformation situations: we ask the corresponding maps between
the kernels $I_i = \Ker(A_i' \to A)$ give a short exact sequence
$$
0 \to I_3 \to I_2 \to I_1 \to 0
$$
of $A$-modules. Note that in this case the map $A_3' \to A_1'$
factors through $A$, hence there is a canonical isomorphism
$A_1' = A[I_1]$.
\end{remark}

\begin{lemma}
\label{lemma-ses-inf-and-T}
Let $S$ be a scheme. Let $p : \mathcal{X} \to \mathcal{Y}$
and $q : \mathcal{Z} \to \mathcal{Y}$ be $1$-morphisms of categories
fibred in groupoids over $(\Sch/S)_{fppf}$. Assume $\mathcal{X}$,
$\mathcal{Y}$, $\mathcal{Z}$ satisfy (RS*).
Let $A$ be an $S$-algebra and let $w$ be an object of
$\mathcal{W} = \mathcal{X} \times_\mathcal{Y} \mathcal{Z}$ over $A$.
Denote $x, y, z$ the objects of $\mathcal{X}, \mathcal{Y}, \mathcal{Z}$
you get from $w$. For any $A$-module $M$ there is a $6$-term exact sequence
$$
\xymatrix{
0 \ar[r] &
\text{Inf}_w(M) \ar[r] &
\text{Inf}_x(M) \oplus \text{Inf}_z(M) \ar[r] &
\text{Inf}_y(M) \ar[lld] \\
 &
T_w(M) \ar[r] &
T_x(M) \oplus T_z(M) \ar[r] &
T_y(M)
}
$$
of $A$-modules.
\end{lemma}

\begin{proof}
By Lemma \ref{lemma-fibre-product-RS-star} we see that $\mathcal{W}$
satisfies (RS*) and hence $T_w(M)$ and $\text{Inf}_w(M)$ are defined.
The horizontal arrows are defined using the functoriality of
Lemma \ref{lemma-functoriality}.

\medskip\noindent
Definition of the ``boundary'' map $\delta : \text{Inf}_y(M) \to T_w(M)$.
Choose isomorphisms $p(x) \to y$ and $y \to q(z)$ such that
$w = (x, z, p(x) \to y \to q(z))$ in the description of
the $2$-fibre product of
Categories, Lemma \ref{categories-lemma-2-product-fibred-categories}
and more precisely
Categories, Lemma \ref{categories-lemma-2-product-categories-over-C}.
Let $x', y', z', w'$ denote the trivial deformation of
$x, y, z, w$ over $A[M]$. By pullback we get isomorphisms
$y' \to p(x')$ and $q(z') \to y'$. An element $\alpha \in \text{Inf}_y(M)$
is the same thing as an automorphism $\alpha : y' \to y'$
over $A[M]$ which restricts to the identity on $y$ over $A$.
Thus setting
$$
\delta(\alpha) =
(x', z', p(x') \to y' \xrightarrow{\alpha} y' \to q(z'))
$$
we obtain an object of $T_w(M)$. This is a map of $A$-modules
by Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-morphism-linear-functors}.

\medskip\noindent
The rest of the proof is exactly the same as the proof of
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-deformation-categories-fiber-product-morphisms}.
\end{proof}

\begin{remark}[Compatibility with previous tangent spaces]
\label{remark-compare-deformation-spaces}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume $\mathcal{X}$ has (RS*).
Let $k$ be a field of finite type over $S$ and let $x_0$ be an object of
$\mathcal{X}$ over $\Spec(k)$. Then we have equalities of
$k$-vector spaces
$$
T\mathcal{F}_{\mathcal{X}, k, x_0} = T_{x_0}(k)
\quad\text{and}\quad
\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0}) =
\text{Inf}_{x_0}(k)
$$
where the spaces on the left hand side of the equality signs are
given in (\ref{equation-tangent-space}) and
(\ref{equation-infinitesimal-automorphisms})
and the spaces on the right hand side are given by
Lemma \ref{lemma-properties-lift-RS-star}.
\end{remark}

\begin{remark}[Canonical element]
\label{remark-canonical-element}
Assumptions and notation as in Lemma \ref{lemma-properties-lift-RS-star}.
Choose an affine open $\Spec(\Lambda) \subset S$ such that $\Spec(A) \to S$
corresponds to a ring map $\Lambda \to A$. Consider the ring map
$$
A \longrightarrow A[\Omega_{A/\Lambda}],
\quad
a \longmapsto (a, \text{d}_{A/\Lambda}(a))
$$
Pulling back $x$ along the corresponding morphism
$\Spec(A[\Omega_{A/\Lambda}]) \to \Spec(A)$ we obtain a
deformation $x_{can}$ of $x$ over $A[\Omega_{A/\Lambda}]$. We call this
the {\it canonical element}
$$
x_{can} \in T_x(\Omega_{A/\Lambda}) = \text{Lift}(x, A[\Omega_{A/\Lambda}]).
$$
Next, assume that $\Lambda$ is Noetherian and $\Lambda \to A$
is of finite type. Let
$k = \kappa(\mathfrak p)$ be a residue field at a finite type point $u_0$
of $U = \Spec(A)$. Let $x_0 = x|_{u_0}$. By (RS*) and the fact that
$A[k] = A \times_k k[k]$ the space $T_x(k)$ is the tangent space to the
deformation functor $\mathcal{F}_{\mathcal{X}, k, x_0}$. Via
$$
T\mathcal{F}_{U, k, u_0} =
\text{Der}_\Lambda(A, k) = \Hom_A(\Omega_{A/\Lambda}, k)
$$
(see Formal Deformation Theory, Example
\ref{formal-defos-example-tangent-space-prorepresentable-functor})
and functoriality of $T_x$ the canonical element produces the map
on tangent spaces induced by the object $x$ over $U$. Namely,
$\theta \in T\mathcal{F}_{U, k, u_0}$ maps to $T_x(\theta)(x_{can})$
in $T_x(k) = T\mathcal{F}_{\mathcal{X}, k, x_0}$.
\end{remark}

\begin{remark}[Canonical automorphism]
\label{remark-canonical-isomorphism}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Assume $\mathcal{X}$ satisfies
condition (RS*). Let $A$ be an $S$-algebra such that
$\Spec(A) \to S$ maps into an affine open and let $x, y$ be objects of
$\mathcal{X}$ over $\Spec(A)$. Further, let $A \to B$ be a ring map and
let $\alpha : x|_{\Spec(B)} \to y|_{\Spec(B)}$ be a morphism of
$\mathcal{X}$ over $\Spec(B)$. Consider the ring map
$$
B \longrightarrow B[\Omega_{B/A}],
\quad
b \longmapsto (b, \text{d}_{B/A}(b))
$$
Pulling back $\alpha$ along the corresponding morphism
$\Spec(B[\Omega_{B/A}]) \to \Spec(B)$ we obtain a
morphism $\alpha_{can}$ between the pullbacks of $x$ and $y$ over
$B[\Omega_{B/A}]$. On the other hand, we can pullback $\alpha$
by the morphism $\Spec(B[\Omega_{B/A}]) \to \Spec(B)$ corresponding
to the injection of $B$ into the first summand of $B[\Omega_{B/A}]$.
By the discussion of Remark \ref{remark-automorphisms}
we can take the difference
$$
\varphi(x, y, \alpha) = \alpha_{can} - \alpha|_{\Spec(B[\Omega_{B/A}])} \in
\text{Inf}_{x|_{\Spec(B)}}(\Omega_{B/A}).
$$
We will call this the {\it canonical automorphism}. It depends
on all the ingredients $A$, $x$, $y$, $A \to B$ and $\alpha$.
\end{remark}





\section{Obstruction theories}
\label{section-obstruction-theory}

\noindent
In this section we describe what an obstruction theory is.
Contrary to the spaces of infinitesimal deformations and infinitesimal
automorphisms, an obstruction theory is an additional piece of data.
The formulation is motivated by the results of
Lemma \ref{lemma-properties-lift-RS-star}
and Remark \ref{remark-functoriality}.

\begin{definition}
\label{definition-obstruction-theory}
Let $S$ be a locally Noetherian base. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. An {\it obstruction theory} is 
given by the following data
\begin{enumerate}
\item for every $S$-algebra $A$ such that $\Spec(A) \to S$
maps into an affine open and every object $x$ of $\mathcal{X}$ over
$\Spec(A)$ an $A$-linear functor
$$
\mathcal{O}_x : \text{Mod}_A \to \text{Mod}_A
$$
of {\it obstruction modules},
\item for $(x, A)$ as in (1), a ring map $A \to B$,
$M \in \text{Mod}_A$, $N \in \text{Mod}_B$, and an $A$-linear
map $M \to N$ an induced $A$-linear map $\mathcal{O}_x(M) \to \mathcal{O}_y(N)$
where $y = x|_{\Spec(B)}$, and
\item for every deformation situation $(x, A' \to A)$ an
{\it obstruction} element
$o_x(A') \in \mathcal{O}_x(I)$ where $I = \Ker(A' \to A)$.
\end{enumerate}
These data are subject to the following conditions
\begin{enumerate}
\item[(i)] the functoriality maps turn the obstruction modules into a functor
from the category of triples $(x, A, M)$ to sets,
\item[(ii)] for every morphism of deformation situations
$(y, B' \to B) \to (x, A' \to A)$ the element $o_x(A')$ maps
to $o_y(B')$, and
\item[(iii)] we have
$$
\text{Lift}(x, A') \not = \emptyset
\Leftrightarrow
o_x(A') = 0
$$
for every deformation situation $(x, A' \to A)$.
\end{enumerate}
\end{definition}

\noindent
This last condition explains the terminology. The module $\mathcal{O}_x(A')$
is called the {\it obstruction module}. The element $o_x(A')$ is the
{\it obstruction}.
Most obstruction theories have additional properties, and in order to
make them useful additional conditions are needed.
Moreover, this is just a sample definition, for example in the definition
we could consider only deformation situations of finite type over $S$.

\medskip\noindent
One of the main reasons for introducing obstruction theories is to check
openness of versality. An example of this type of result is
Lemma \ref{lemma-get-openness-obstruction-theory} below.
The initial idea to do this is due to Artin, see
the papers of Artin mentioned in the introduction. It has been taken up
for example in the work by Flenner \cite{Flenner},
Hall \cite{Hall-coherent},
Hall and Rydh \cite{rydh_axioms},
Olsson \cite{olsson_deformation},
Olsson and Starr \cite{olsson-starr}, and
Lieblich \cite{lieblich-complexes} (random order of references).
Moreover, for particular categories fibred in groupoids, often
authors develop a little bit of theory adapted to the problem at hand.
We will develop this theory later (insert future reference here).

\begin{lemma}
\label{lemma-get-openness-obstruction-theory}
\begin{reference}
This is \cite[Theorem 4.4]{Hall-coherent}
\end{reference}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume
\begin{enumerate}
\item $\Delta : \mathcal{X} \to \mathcal{X} \times \mathcal{X}$ is
representable by algebraic spaces,
\item $\mathcal{X}$ has (RS*),
\item $\mathcal{X}$ is limit preserving,
\item there exists an obstruction theory\footnote{Analyzing the proof
the reader sees that in fact it suffices to check
the functoriality (ii) of obstruction classes in
Definition \ref{definition-obstruction-theory}
for maps $(y, B' \to B) \to (x, A' \to A)$
with $B = A$ and $y = x$.},
\item for an object $x$ of $\mathcal{X}$ over $\Spec(A)$
and $A$-modules $M_n$, $n \geq 1$ we have
\begin{enumerate}
\item $T_x(\prod M_n) = \prod T_x(M_n)$,
\item $\mathcal{O}_x(\prod M_n) \to \prod \mathcal{O}_x(M_n)$
is injective.
\end{enumerate}
\end{enumerate}
Then $\mathcal{X}$ satisfies openness of versality.
\end{lemma}

\begin{proof}
We prove this by verifying condition (4) of
Lemma \ref{lemma-SGE-implies-openness-versality}.
Let $(\xi_n)$ and $(R_n)$ be as in Remark \ref{remark-strong-effectiveness}
such that $\Ker(R_m \to R_n)$ is an ideal of square zero
for all $m \geq n$. Set $A = R_1$ and $x = \xi_1$.
Denote $M_n = \Ker(R_n \to R_1)$.
Then $M_n$ is an $A$-module. Set $R = \lim R_n$.
Let
$$
\tilde R = \{(r_1, r_2, r_3 \ldots) \in \prod R_n
\text{ such that all have the same image in }A\}
$$
Then $\tilde R \to A$ is surjective with kernel $M = \prod M_n$.
There is a map $R \to \tilde R$ and a map
$\tilde R \to A[M]$, $(r_1, r_2, r_3, \ldots) \mapsto
(r_1, r_2 - r_1, r_3 - r_2, \ldots)$.
Together these give a short exact sequence
$$
(x, R \to A) \to (x, \tilde R \to A) \to (x, A[M])
$$
of deformation situations, see
Remark \ref{remark-short-exact-sequence-thickenings}.
The associated sequence of kernels
$0 \to \lim M_n \to M \to M \to 0$
is the canonical sequence computing the limit
of the system of modules $(M_n)$.

\medskip\noindent
Let $o_x(\tilde R) \in \mathcal{O}_x(M)$ be the obstruction element.
Since we have the lifts $\xi_n$ we see that $o_x(\tilde R)$
maps to zero in $\mathcal{O}_x(M_n)$. By assumption (5)(b)
we see that $o_x(\tilde R) = 0$. Choose a lift $\tilde \xi$
of $x$ to $\Spec(\tilde R)$. Let $\tilde \xi_n$ be the
restriction of $\tilde \xi$ to $\Spec(R_n)$. There exists
elements $t_n \in T_x(M_n)$ such that
$t_n \cdot \tilde \xi_n = \xi_n$ by
Lemma \ref{lemma-properties-lift-RS-star} part (2)(b).
By assumption (5)(a) we can find $t \in T_x(M)$
mapping to $t_n$ in $T_x(M_n)$. After replacing
$\tilde \xi$ by $t \cdot \tilde \xi$ we find that
$\tilde \xi$ restricts to $\xi_n$ over $\Spec(R_n)$ for all $n$.
In particular, since $\xi_{n + 1}$ restricts to $\xi_n$
over $\Spec(R_n)$, the restriction $\overline{\xi}$ of $\tilde \xi$
to $\Spec(A[M])$ has the property that it restricts to
the trivial deformation over $\Spec(A[M_n])$ for all $n$.
Hence by assumption (5)(a) we find that $\overline{\xi}$
is the trivial deformation of $x$. By axiom (RS*)
applied to $R = \tilde R \times_{A[M]} A$
this implies that $\tilde \xi$ is the pullback
of a deformation $\xi$ of $x$ over $R$. This finishes the proof.
\end{proof}

\begin{example}
\label{example-global-sections}
Let $S = \Spec(\Lambda)$ for some Noetherian ring $\Lambda$.
Let $W \to S$ be a morphism of schemes. Let $\mathcal{F}$
be a quasi-coherent $\mathcal{O}_W$-module flat over $S$.
Consider the functor
$$
F : (\Sch/S)_{fppf}^{opp} \longrightarrow \textit{Sets},
\quad
T/S \longrightarrow H^0(W_T, \mathcal{F}_T)
$$
where $W_T = T \times_S W$ is the base change and $\mathcal{F}_T$ is
the pullback of $\mathcal{F}$ to $W_T$. If $T = \Spec(A)$
we will write $W_T = W_A$, etc. Let $\mathcal{X} \to (\Sch/S)_{fppf}$
be the category fibred in groupoids associated to $F$. Then
$\mathcal{X}$ has an obstruction theory. Namely,
\begin{enumerate}
\item given $A$ over $\Lambda$ and
$x \in H^0(W_A, \mathcal{F}_A)$ we set
$\mathcal{O}_x(M) = H^1(W_A, \mathcal{F}_A \otimes_A M)$,
\item given a deformation situation $(x, A' \to A)$ we let
$o_x(A') \in \mathcal{O}_x(A)$ be the image of $x$ under the boundary map
$$
H^0(W_A, \mathcal{F}_A) \longrightarrow H^1(W_A, \mathcal{F}_A \otimes_A I)
$$
coming from the short exact sequence of modules
$$
0 \to \mathcal{F}_A \otimes_A I \to
\mathcal{F}_{A'} \to \mathcal{F}_A \to 0.
$$
\end{enumerate}
We have omitted some details, in particular the construction of the short
exact sequence above (it uses that $W_A$ and $W_{A'}$ have the same
underlying topological space) and the explanation for why flatness
of $\mathcal{F}$ over $S$ implies that the sequence above is short exact.
\end{example}

\begin{example}[Key example]
\label{example-key}
Let $S = \Spec(\Lambda)$ for some Noetherian ring $\Lambda$.
Say $\mathcal{X} = (\Sch/X)_{fppf}$ with $X = \Spec(R)$ and
$R = \Lambda[x_1, \ldots, x_n]/J$. The naive cotangent
complex $\NL_{R/\Lambda}$ is (canonically) homotopy equivalent to
$$
J/J^2
\longrightarrow
\bigoplus\nolimits_{i = 1, \ldots, n} R\text{d}x_i,
$$
see Algebra, Lemma \ref{algebra-lemma-NL-homotopy}.
Consider a deformation situation $(x, A' \to A)$. Denote $I$ the kernel of
$A' \to A$. The object $x$ corresponds to $(a_1, \ldots, a_n)$
with $a_i \in A$ such that $f(a_1, \ldots, a_n) = 0$ in $A$ for all $f \in J$.
Set
\begin{align*}
\mathcal{O}_x(A')
& =
\Hom_R(J/J^2, I)/\Hom_R(R^{\oplus n}, I) \\
& =
\Ext^1_R(\NL_{R/\Lambda}, I) \\
& =
\Ext^1_A(\NL_{R/\Lambda} \otimes_R A, I).
\end{align*}
Choose lifts $a_i' \in A'$ of $a_i$ in $A$. Then $o_x(A')$
is the class of the map $J/J^2 \to I$ defined by sending $f \in J$ to
$f(a_1', \ldots, a'_n) \in I$. We omit the verification that
$o_x(A')$ is independent of choices. It is clear that if $o_x(A') = 0$
then the map lifts. Finally, functoriality is straightforward.
Thus we obtain an obstruction theory. We observe that $o_x(A')$
can be described a bit more canonically as the composition
$$
\NL_{R/\Lambda} \to \NL_{A/\Lambda} \to \NL_{A/A'} = I[1]
$$
in $D(A)$, see Algebra, Lemma \ref{algebra-lemma-NL-surjection}
for the last identification.
\end{example}









\section{Naive obstruction theories}
\label{section-naive-obstruction-theory}

\noindent
The title of this section refers to the fact that we will use the
naive cotangent complex in this section. Let $(x, A' \to A)$
be a deformation situation for a given category fibred in groupoids over a
locally Noetherian scheme $S$. The key Example \ref{example-key}
suggests that any obstruction theory should be closely related to
maps in $D(A)$ with target the naive cotangent complex of $A$.
Working this out we find a criterion for versality in
Lemma \ref{lemma-characterize-versal} which leads to a criterion for
openness of versality in Lemma \ref{lemma-openness}. We introduce a notion of
a naive obstruction theory in
Definition \ref{definition-naive-obstruction-theory} to try to formalize
the notion a bit further.

\medskip\noindent
In the following we will use the naive cotangent complex as
defined in Algebra, Section \ref{algebra-section-netherlander}.
In particular, if $A' \to A$ is a surjection of $\Lambda$-algebras
with square zero kernel $I$, then there are maps
$$
\NL_{A'/\Lambda} \to \NL_{A/\Lambda} \to \NL_{A/A'}
$$
whose composition is homotopy equivalent to zero (see
Algebra, Remark \ref{algebra-remark-composition-homotopy-equivalent-to-zero}).
This doesn't form a distinguished triangle in general as we are using
the naive cotangent complex and not the full one.
There is a homotopy equivalence $\NL_{A/A'} \to I[1]$ (the complex
consisting of $I$ placed in degree $-1$, see
Algebra, Lemma \ref{algebra-lemma-NL-surjection}).
Finally, note that there is a canonical map
$\NL_{A/\Lambda} \to \Omega_{A/\Lambda}$.

\begin{lemma}
\label{lemma-compute-ext-into-field}
Let $A \to k$ be a ring map with $k$ a field. Let $E \in D^-(A)$.
Then $\Ext^i_A(E, k) = \Hom_k(H^{-i}(E \otimes^\mathbf{L} k), k)$.
\end{lemma}

\begin{proof}
Omitted. Hint: Replace $E$ by a bounded above complex of free $A$-modules
and compute both sides.
\end{proof}

\begin{lemma}
\label{lemma-construct-essential-surjection}
Let $\Lambda \to A \to k$ be finite type ring maps of Noetherian rings with
$k = \kappa(\mathfrak p)$ for some prime $\mathfrak p$ of $A$. Let
$\xi : E \to \NL_{A/\Lambda}$ be morphism of $D^{-}(A)$ such that
$H^{-1}(\xi \otimes^{\mathbf{L}} k)$ is not surjective.
Then there exists a surjection $A' \to A$ of $\Lambda$-algebras
such that
\begin{enumerate}
\item[(a)] $I = \Ker(A' \to A)$ has square zero and is isomorphic to $k$
as an $A$-module,
\item[(b)] $\Omega_{A'/\Lambda} \otimes k = \Omega_{A/\Lambda} \otimes k$, and
\item[(c)] $E \to \NL_{A/A'}$ is zero.
\end{enumerate}
\end{lemma}

\begin{proof}
Let $f \in A$, $f \not \in \mathfrak p$. Suppose that $A'' \to A_f$
satisfies (a), (b), (c) for the induced map
$E \otimes_A A_f \to \NL_{A_f/\Lambda}$, see
Algebra, Lemma \ref{algebra-lemma-localize-NL}.
Then we can set $A' = A'' \times_{A_f} A$ and get a solution.
Namely, it is clear that $A' \to A$ satisfies (a) because
$\Ker(A' \to A) = \Ker(A'' \to A) = I$. Pick
$f'' \in A''$ lifting $f$. Then the localization of $A'$ at
$(f'', f)$ is isomorphic to $A''$
(for example by
More on Algebra, Lemma \ref{more-algebra-lemma-diagram-localize}).
Thus (b) and (c) are clear for $A'$ too.
In this way we see that we may replace $A$ by the localization
$A_f$ (finitely many times).
In particular (after such a replacement) we may assume that $\mathfrak p$
is a maximal ideal of $A$, see
Morphisms, Lemma \ref{morphisms-lemma-point-finite-type}.

\medskip\noindent
Choose a presentation $A = \Lambda[x_1, \ldots, x_n]/J$. Then
$\NL_{A/\Lambda}$ is (canonically) homotopy equivalent to
$$
J/J^2
\longrightarrow
\bigoplus\nolimits_{i = 1, \ldots, n} A\text{d}x_i,
$$
see Algebra, Lemma \ref{algebra-lemma-NL-homotopy}. After localizing
if necessary (using Nakayama's lemma) we can choose generators
$f_1, \ldots, f_m$ of $J$ such that $f_j \otimes 1$ form a basis for
$J/J^2 \otimes_A k$. Moreover, after renumbering, we can assume that the
images of $\text{d}f_1, \ldots, \text{d}f_r$ form a
basis for the image of $J/J^2 \otimes k \to \bigoplus k\text{d}x_i$
and that $\text{d}f_{r + 1}, \ldots, \text{d}f_m$ map to zero in
$\bigoplus k\text{d}x_i$. With these choices the space
$$
H^{-1}(\NL_{A/\Lambda} \otimes^{\mathbf{L}}_A k) =
H^{-1}(\NL_{A/\Lambda} \otimes_A k)
$$
has basis $f_{r + 1} \otimes 1, \ldots, f_m \otimes 1$. Changing basis
once again we may assume that the image of $H^{-1}(\xi \otimes^{\mathbf{L}} k)$
is contained in the $k$-span of
$f_{r + 1} \otimes 1, \ldots, f_{m - 1} \otimes 1$.
Set
$$
A' = \Lambda[x_1, \ldots, x_n]/(f_1, \ldots, f_{m - 1}, \mathfrak pf_m)
$$
By construction $A' \to A$ satisfies (a). Since $\text{d}f_m$ maps
to zero in $\bigoplus k\text{d}x_i$ we see that (b) holds. Finally, by
construction the induced map $E \to \NL_{A/A'} = I[1]$ induces the zero map
$H^{-1}(E \otimes_A^\mathbf{L} k) \to I \otimes_A k$. By
Lemma \ref{lemma-compute-ext-into-field}
we see that the composition is zero.
\end{proof}

\noindent
The following lemma is our key technical result.

\begin{lemma}
\label{lemma-characterize-versal}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$ satisfying (RS*).
Let $U = \Spec(A)$ be an
affine scheme of finite type over $S$ which maps into an affine open
$\Spec(\Lambda)$. Let $x$ be an object of $\mathcal{X}$ over $U$.
Let $\xi : E \to \NL_{A/\Lambda}$ be a morphism of $D^{-}(A)$. Assume
\begin{enumerate}
\item[(i)] for every deformation situation $(x, A' \to A)$ we have:
$x$ lifts to $\Spec(A')$ if and only if
$E \to \NL_{A/\Lambda} \to \NL_{A/A'}$ is zero, and
\item[(ii)] there is an isomorphism of functors
$T_x(-) \to \Ext^0_A(E, -)$
such that $E \to \NL_{A/\Lambda} \to \Omega^1_{A/\Lambda}$
corresponds to the canonical element (see
Remark \ref{remark-canonical-element}).
\end{enumerate}
Let $u_0 \in U$ be a finite type point with residue field
$k = \kappa(u_0)$. Consider the following statements
\begin{enumerate}
\item $x$ is versal at $u_0$, and
\item $\xi : E \to \NL_{A/\Lambda}$ induces a surjection
$H^{-1}(E \otimes_A^{\mathbf{L}} k) \to
H^{-1}(\NL_{A/\Lambda} \otimes_A^{\mathbf{L}} k)$
and an injection
$H^0(E \otimes_A^{\mathbf{L}} k) \to
H^0(\NL_{A/\Lambda} \otimes_A^{\mathbf{L}} k)$.
\end{enumerate}
Then we always have (2) $\Rightarrow$ (1) and we have (1) $\Rightarrow$ (2)
if $u_0$ is a closed point.
\end{lemma}

\begin{proof}
Let $\mathfrak p = \Ker(A \to k)$ be the prime corresponding to $u_0$.

\medskip\noindent
Assume that $x$ versal at $u_0$ and that $u_0$ is a closed point of $U$.
If $H^{-1}(\xi \otimes_A^{\mathbf{L}} k)$ is not surjective, then
let $A' \to A$ be an extension with kernel $I$ as in
Lemma \ref{lemma-construct-essential-surjection}.
Because $u_0$ is a closed point, we see that $I$ is a finite $A$-module,
hence that $A'$ is a finite type $\Lambda$-algebra (this fails if
$u_0$ is not closed). In particular $A'$ is Noetherian.
By property (c) for $A'$ and (i) for $\xi$ we see that $x$ lifts to
an object $x'$ over $A'$.
Let $\mathfrak p' \subset A'$ be kernel of the surjective map to $k$.
By Artin-Rees (Algebra, Lemma \ref{algebra-lemma-Artin-Rees})
there exists an $n > 1$ such that $(\mathfrak p')^n \cap I = 0$.
Then we see that
$$
B' = A'/(\mathfrak p')^n \longrightarrow A/\mathfrak p^n = B
$$
is a small, essential extension of local Artinian rings, see
Formal Deformation Theory, Lemma
\ref{formal-defos-lemma-essential-surjection}.
On the other hand, as $x$ is versal at $u_0$ and as $x'|_{\Spec(B')}$
is a lift of $x|_{\Spec(B)}$, there exists an integer
$m \geq n$ and a map $q : A/\mathfrak p^m \to B'$
such that the composition
$A/\mathfrak p^m \to B' \to B$ is the quotient map.
Since the maximal ideal of $B'$ has $n$th power equal to zero, this
$q$ factors through $B$ which contradicts the fact that $B' \to B$ is an
essential surjection. This contradiction shows that
$H^{-1}(\xi \otimes_A^{\mathbf{L}} k)$
is surjective.

\medskip\noindent
Assume that $x$ versal at $u_0$. By Lemma \ref{lemma-compute-ext-into-field}
the map $H^0(\xi \otimes_A^{\mathbf{L}} k)$ is dual to the map
$\Ext^0_A(\NL_{A/\Lambda}, k) \to \text{Ext}^0_A(E, k)$. Note that
$$
\Ext^0_A(\NL_{A/\Lambda}, k) = \text{Der}_\Lambda(A, k)
\quad\text{and}\quad
T_x(k) = \Ext^0_A(E, k)
$$
Condition (ii) assures us the map
$\Ext^0_A(\NL_{A/\Lambda}, k) \to \text{Ext}^0_A(E, k)$
sends a tangent vector $\theta$ to $U$ at $u_0$ to the corresponding
infinitesimal deformation of $x_0$, see Remark \ref{remark-canonical-element}.
Hence if $x$ is versal, then this map is surjective, see
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-versal-criterion}.
Hence $H^0(\xi \otimes_A^{\mathbf{L}} k)$ is injective.
This finishes the proof of (1) $\Rightarrow$ (2) in case $u_0$ is a
closed point.

\medskip\noindent
For the rest of the proof assume $H^{-1}(E \otimes_A^\mathbf{L} k) \to
H^{-1}(\NL_{A/\Lambda} \otimes_A^\mathbf{L} k)$
is surjective and
$H^0(E \otimes_A^\mathbf{L} k) \to
H^0(\NL_{A/\Lambda} \otimes_A^\mathbf{L} k)$
injective. Set $R = A_\mathfrak p^\wedge$ and let $\eta$ be the
formal object over $R$ associated to $x|_{\Spec(R)}$.
The map $d\underline{\eta}$ on tangent spaces is surjective
because it is identified with the dual of the injective map
$H^0(E \otimes_A^{\mathbf{L}} k) \to
H^0(\NL_{A/\Lambda} \otimes_A^{\mathbf{L}} k)$
(see previous paragraph). According to
Formal Deformation Theory, Lemma \ref{formal-defos-lemma-versal-criterion}
it suffices to prove the following:
Let $C' \to C$ be a small extension of finite type Artinian local
$\Lambda$-algebras with residue field $k$. Let $R \to C$ be a
$\Lambda$-algebra map compatible with identifications of residue fields.
Let $y = x|_{\Spec(C)}$ and let $y'$ be a lift of $y$ to $C'$.
To show: we can lift the $\Lambda$-algebra map $R \to C$ to $R \to C'$.

\medskip\noindent
Observe that it suffices to lift the $\Lambda$-algebra map $A \to C$.
Let $I = \Ker(C' \to C)$. Note that $I$ is a $1$-dimensional $k$-vector
space. The obstruction $ob$ to lifting $A \to C$ is an element of
$\Ext^1_A(\NL_{A/\Lambda}, I)$, see Example \ref{example-key}.
By Lemma \ref{lemma-compute-ext-into-field} and our assumption the map
$\xi$ induces an injection
$$
\Ext^1_A(\NL_{A/\Lambda}, I)
\longrightarrow
\Ext^1_A(E, I)
$$
By the construction of $ob$ and (i) the image of $ob$ in $\Ext^1_A(E, I)$
is the obstruction to lifting $x$ to $A \times_C C'$. By (RS*) the fact that
$y/C$ lifts to $y'/C'$ implies that $x$ lifts to $A \times_C C'$. Hence
$ob = 0$ and we are done.
\end{proof}

\noindent
The key lemma above allows us to conclude that we have openness of
versality in some cases.

\begin{lemma}
\label{lemma-openness}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$ satisfying (RS*).
Let $U = \Spec(A)$ be an affine scheme of finite type over $S$ which maps
into an affine open $\Spec(\Lambda)$. Let $x$ be an object of $\mathcal{X}$
over $U$. Let $\xi : E \to \NL_{A/\Lambda}$ be a morphism of $D^{-}(A)$.
Assume
\begin{enumerate}
\item[(i)] for every deformation situation $(x, A' \to A)$ we have:
$x$ lifts to $\Spec(A')$ if and only if
$E \to \NL_{A/\Lambda} \to \NL_{A/A'}$ is zero,
\item[(ii)] there is an isomorphism of functors
$T_x(-) \to \Ext^0_A(E, -)$
such that $E \to \NL_{A/\Lambda} \to \Omega^1_{A/\Lambda}$
corresponds to the canonical element (see
Remark \ref{remark-canonical-element}),
\item[(iii)] the cohomology groups of $E$ are finite $A$-modules.
\end{enumerate}
If $x$ is versal at a closed point $u_0 \in U$,
then there exists an open neighbourhood $u_0 \in U' \subset U$
such that $x$ is versal at every finite type point of $U'$.
\end{lemma}

\begin{proof}
Let $C$ be the cone of $\xi$ so that we have a distinguished triangle
$$
E \to \NL_{A/\Lambda} \to C \to E[1]
$$
in $D^{-}(A)$. By Lemma \ref{lemma-characterize-versal}
the assumption that $x$ is versal at $u_0$ implies that
$H^{-1}(C \otimes^\mathbf{L} k) = 0$. By
More on Algebra, Lemma \ref{more-algebra-lemma-cut-complex-in-two}
there exists an $f \in A$ not contained in the prime corresponding to
$u_0$ such that $H^{-1}(C \otimes^\mathbf{L}_A M) = 0$ for
any $A_f$-module $M$. Using
Lemma \ref{lemma-characterize-versal}
again we see that we have versality for all finite type points of
the open $D(f) \subset U$.
\end{proof}

\noindent
The technical lemmas above suggest the following definition.

\begin{definition}
\label{definition-naive-obstruction-theory}
Let $S$ be a locally Noetherian base. Let $\mathcal{X}$ be a category fibred
in groupoids over $(\Sch/S)_{fppf}$. Assume that $\mathcal{X}$
satisfies (RS*). A {\it naive obstruction theory} is 
given by the following data
\begin{enumerate}
\item
\label{item-map}
for every $S$-algebra $A$ such that $\Spec(A) \to S$
maps into an affine open $\Spec(\Lambda) \subset S$ and every object $x$
of $\mathcal{X}$ over $\Spec(A)$ we are given an object $E_x \in D^-(A)$
and a map $\xi_x : E \to \NL_{A/\Lambda}$,
\item
\label{item-inf}
given $(x, A)$ as in (\ref{item-map}) there are transformations of
functors
$$
\text{Inf}_x( - ) \to \Ext^{-1}_A(E_x, -)
\quad\text{and}\quad
T_x(-) \to \Ext^0_A(E_x, -)
$$
\item
\label{item-functoriality}
for $(x, A)$ as in (\ref{item-map}) and a ring map $A \to B$
setting $y = x|_{\Spec(B)}$ there is a functoriality map
$E_x \to E_y$ in $D(A)$.
\end{enumerate}
These data are subject to the following conditions
\begin{enumerate}
\item[(i)]
in the situation of (\ref{item-functoriality}) the diagram
$$
\xymatrix{
E_y \ar[r]_{\xi_y} & \NL_{B/\Lambda} \\
E_x \ar[u] \ar[r]^{\xi_x} & \NL_{A/\Lambda} \ar[u]
}
$$
is commutative in $D(A)$,
\item[(ii)]
given $(x, A)$ as in (\ref{item-map}) and $A \to B \to C$
setting $y = x|_{\Spec(B)}$ and $z = x|_{\Spec(C)}$ the
composition of the functoriality maps $E_x \to E_y$ and $E_y \to E_z$ is
the functoriality map $E_x \to E_z$,
\item[(iii)]
the maps of (\ref{item-inf}) are isomorphisms
compatible with the functoriality
maps and the maps of Remark \ref{remark-functoriality},
\item[(iv)]
the composition $E_x \to \NL_{A/\Lambda} \to \Omega_{A/\Lambda}$
corresponds to the canonical element of
$T_x(\Omega_{A/\Lambda}) = \Ext^0(E_x, \Omega_{A/\Lambda})$, see
Remark \ref{remark-canonical-element},
\item[(v)]
given a deformation situation $(x, A' \to A)$ with $I = \Ker(A' \to A)$
the composition $E_x \to \NL_{A/\Lambda} \to \NL_{A/A'}$ is zero in
$$
\Hom_A(E_x, \NL_{A/\Lambda}) = \Ext^0_A(E_x, \NL_{A/A'}) =
\Ext^1_A(E_x, I)
$$
if and only if $x$ lifts to $A'$.
\end{enumerate}
\end{definition}

\noindent
Thus we see in particular that we obtain an obstruction theory
as in Section \ref{section-obstruction-theory} by setting
$\mathcal{O}_x( - ) = \Ext^1_A(E_x, -)$.

\begin{lemma}
\label{lemma-naive-obstruction-theory-qis}
Let $S$ and $\mathcal{X}$ be as in
Definition \ref{definition-naive-obstruction-theory}
and let $\mathcal{X}$ be endowed with a naive obstruction theory.
Let $A \to B$ and $y \to x$ be as in (\ref{item-functoriality}).
Let $k$ be a $B$-algebra which is a field. Then the functoriality
map $E_x \to E_y$ induces bijections
$$
H^i(E_x \otimes_A^{\mathbf{L}} k) \to H^i(E_y \otimes_B^{\mathbf{L}} k)
$$
for $i = 0, 1$.
\end{lemma}

\begin{proof}
Let $z = x|_{\Spec(k)}$. Then (RS*) implies that
$$
\textit{Lift}(x, A[k]) = \textit{Lift}(z, k[k])
\quad\text{and}\quad
\textit{Lift}(y, B[k]) = \textit{Lift}(z, k[k])
$$
because $A[k] = A \times_k k[k]$ and $B[k] = B \times_k k[k]$.
Hence the properties of a naive obstruction theory imply that the
functoriality map $E_x \to E_y$ induces bijections
$\Ext^i_A(E_x, k) \to \text{Ext}^i_B(E_y, k)$
for $i = -1, 0$. By Lemma \ref{lemma-compute-ext-into-field} our maps
$H^i(E_x \otimes_A^{\mathbf{L}} k) \to H^i(E_y \otimes_B^{\mathbf{L}} k)$,
$i = 0, 1$ induce isomorphisms on dual vector spaces hence are isomorphisms.
\end{proof}

\begin{lemma}
\label{lemma-naive-obstruction-theory-gives-openness}
Let $S$ be a locally Noetherian scheme. Let
$p : \mathcal{X} \to (\Sch/S)_{fppf}^{opp}$ be a category fibred in groupoids.
Assume that $\mathcal{X}$ satisfies (RS*)
and that $\mathcal{X}$ has a naive obstruction theory.
Then openness of versality holds for $\mathcal{X}$ provided the
complexes $E_x$ of Definition \ref{definition-naive-obstruction-theory}
have finitely generated cohomology groups for pairs $(A, x)$ where
$A$ is of finite type over $S$.
\end{lemma}

\begin{proof}
Let $U$ be a scheme locally of finite type over $S$, let $x$ be an object of
$\mathcal{X}$ over $U$, and let $u_0$ be a finite type point of $U$ such that
$x$ is versal at $u_0$. We may first shrink $U$ to an affine scheme such
that $u_0$ is a closed point and such that $U \to S$ maps into an affine
open $\Spec(\Lambda)$. Say $U = \Spec(A)$. Let
$\xi_x : E_x \to \NL_{A/\Lambda}$ be the obstruction map.
At this point we may apply Lemma \ref{lemma-openness} to conclude.
\end{proof}









\section{A dual notion}
\label{section-dual}

\noindent
Let $(x, A' \to A)$ be a deformation situation for a given category
$\mathcal{X}$ fibred in groupoids over a locally Noetherian scheme $S$.
Assume $\mathcal{X}$ has an obstruction theory, see
Definition \ref{definition-obstruction-theory}. In practice
one often has a complex $K^\bullet$ of $A$-modules and isomorphisms of
functors
$$
\text{Inf}_x(-) \to H^0(K^\bullet \otimes_A^\mathbf{L} -),\quad
T_x(-) \to H^1(K^\bullet \otimes_A^\mathbf{L} -),\quad
\mathcal{O}_x(-) \to H^2(K^\bullet \otimes_A^\mathbf{L} -)
$$
In this section we formalize this a little bit and show how this leads
to a verification of openness of versality in some cases.

\begin{example}
\label{example-global-sections-dual}
Let $\Lambda, S, W, \mathcal{F}$ be as in
Example \ref{example-global-sections}.
Assume that $W \to S$ is proper and $\mathcal{F}$ coherent. By
Cohomology of Schemes, Remark
\ref{coherent-remark-explain-perfect-direct-image}
there exists a finite complex of finite projective $\Lambda$-modules
$N^\bullet$ which universally computes the cohomology of $\mathcal{F}$.
In particular the obstruction spaces from Example \ref{example-global-sections}
are $\mathcal{O}_x(M) = H^1(N^\bullet \otimes_\Lambda M)$.
Hence with $K^\bullet = N^\bullet \otimes_\Lambda A[-1]$ we see that
$\mathcal{O}_x(M) = H^2(K^\bullet \otimes_A^\mathbf{L} M)$.
\end{example}

\begin{situation}
\label{situation-dual}
Let $S$ be a locally Noetherian scheme. Let $\mathcal{X}$ be a category
fibred in groupoids over $(\Sch/S)_{fppf}$. Assume that
$\mathcal{X}$ has (RS*) so that we can speak of the functor $T_x(-)$, see
Lemma \ref{lemma-properties-lift-RS-star}.
Let $U = \Spec(A)$ be an affine scheme of finite type over $S$ which maps
into an affine open $\Spec(\Lambda)$. Let $x$ be an object of $\mathcal{X}$
over $U$. Assume we are given
\begin{enumerate}
\item a complex of $A$-modules $K^\bullet$,
\item a transformation of functors
$T_x(-) \to H^1(K^\bullet \otimes_A^\mathbf{L} -)$,
\item for every deformation situation $(x, A' \to A)$ with kernel
$I = \Ker(A' \to A)$ an element
$o_x(A') \in H^2(K^\bullet \otimes_A^\mathbf{L} I)$
\end{enumerate}
satisfying the following (minimal) conditions
\begin{enumerate}
\item[(i)] the transformation
$T_x(-) \to H^1(K^\bullet \otimes_A^\mathbf{L} -)$
is an isomorphism,
\item[(ii)] given a morphism $(x, A'' \to A) \to (x, A' \to A)$ of deformation
situations the element $o_x(A')$ maps to the element $o_x(A'')$
via the map
$H^2(K^\bullet \otimes_A^\mathbf{L} I) \to
H^2(K^\bullet \otimes_A^\mathbf{L} I')$
where $I' = \Ker(A'' \to A)$, and
\item[(iii)] $x$ lifts to an object over $\Spec(A')$ if and only if
$o_x(A') = 0$.
\end{enumerate}
It is possible to incorporate infinitesimal automorphisms as well, but
we refrain from doing so in order to get the sharpest possible result.
\end{situation}

\noindent
In Situation \ref{situation-dual} an important role will be played by
$K^\bullet \otimes_A^\mathbf{L} \NL_{A/\Lambda}$. Suppose we are given an
element $\xi \in H^1(K^\bullet \otimes_A^\mathbf{L} \NL_{A/\Lambda})$.
Then (1) for any surjection $A' \to A$ of $\Lambda$-algebras with kernel
$I$ of square zero the canonical map $\NL_{A/\Lambda} \to \NL_{A/A'} = I[1]$
sends $\xi$ to an element $\xi_{A'} \in H^2(K^\bullet \otimes_A^\mathbf{L} I)$
and (2) the map $\NL_{A/\Lambda} \to \Omega_{A/\Lambda}$ sends
$\xi$ to an element $\xi_{can}$ of
$H^1(K^\bullet \otimes_A^\mathbf{L} \Omega_{A/\Lambda})$.

\begin{lemma}
\label{lemma-dual-obstruction}
In Situation \ref{situation-dual}. Assume furthermore that
\begin{enumerate}
\item[(iv)] given a short exact sequence of deformation situations
as in Remark \ref{remark-short-exact-sequence-thickenings} and
a lift $x'_2 \in \text{Lift}(x, A_2')$ then
$o_x(A_3') \in H^2(K^\bullet \otimes_A^\mathbf{L} I_3)$
equals $\partial\theta$ where
$\theta \in H^1(K^\bullet \otimes_A^\mathbf{L} I_1)$
is the element corresponding to $x'_2|_{\Spec(A_1')}$ via
$A_1' = A[I_1]$ and the given map
$T_x(-) \to H^1(K^\bullet \otimes_A^\mathbf{L} -)$.
\end{enumerate}
In this case there exists an element
$\xi \in H^1(K^\bullet \otimes_A^\mathbf{L} \NL_{A/\Lambda})$
such that
\begin{enumerate}
\item for every deformation situation $(x, A' \to A)$ we have
$\xi_{A'} = o_x(A')$, and
\item $\xi_{can}$ matches the canonical element of
Remark \ref{remark-canonical-element} via the given transformation
$T_x(-) \to H^1(K^\bullet \otimes_A^\mathbf{L} -)$.
\end{enumerate}
\end{lemma}

\begin{proof}
Choose a $\alpha : \Lambda[x_1, \ldots, x_n] \to A$ with kernel $J$.
Write $P = \Lambda[x_1, \ldots, x_n]$. In the rest of this proof we work with
$$
\NL(\alpha) = (J/J^2 \longrightarrow \bigoplus A \text{d}x_i)
$$
which is permissible by
Algebra, Lemma \ref{algebra-lemma-NL-homotopy}
and
More on Algebra, Lemma \ref{more-algebra-lemma-derived-tor-homotopy}.
Consider the element
$o_x(P/J^2) \in H^2(K^\bullet \otimes_A^\mathbf{L} J/J^2)$ and consider
the quotient
$$
C = (P/J^2 \times \bigoplus A \text{d}x_i)/(J/J^2)
$$
where $J/J^2$ is embedded diagonally. Note that $C \to A$ is a surjection
with kernel $\bigoplus A\text{d}x_i$. Moreover there is a section
$A \to C$ to $C \to A$ given by mapping the class of $f \in P$ to the class
of $(f, \text{d}f)$ in the pushout. For later use, denote $x_C$ the
pullback of $x$ along the corresponding morphism $\Spec(C) \to \Spec(A)$.
Thus we see that $o_x(C) = 0$.
We conclude that $o_x(P/J^2)$ maps to zero in
$H^2(K^\bullet \otimes_A^\mathbf{L} \bigoplus A\text{d}x_i)$.
It follows that there exists some element
$\xi \in H^1(K^\bullet \otimes_A^\mathbf{L} \NL(\alpha))$
mapping to $o_x(P/J^2)$.

\medskip\noindent
Note that for any deformation situation $(x, A' \to A)$ there exists
a $\Lambda$-algebra map $P/J^2 \to A'$ compatible with the augmentations
to $A$. Hence the
element $\xi$ satisfies the first property of the lemma by construction
and property (ii) of Situation \ref{situation-dual}.

\medskip\noindent
Note that our choice of $\xi$ was well defined up to the choice of an
element of $H^1(K^\bullet \otimes_A^\mathbf{L} \bigoplus A\text{d}x_i)$.
We will show that after modifying $\xi$ by an element of the aforementioned
group we can arrange it so that the second assertion of the lemma is true.
Let $C' \subset C$ be the image of $P/J^2$ under the
$\Lambda$-algebra map $P/J^2 \to C$ (inclusion of first factor).
Observe that
$\Ker(C' \to A) = \Im(J/J^2 \to \bigoplus A\text{d}x_i)$.
Set $\overline{C} = A[\Omega_{A/\Lambda}]$. The map
$P/J^2 \times \bigoplus A \text{d}x_i \to \overline{C}$,
$(f, \sum f_i \text{d}x_i) \mapsto (f \bmod J, \sum f_i \text{d}x_i)$
factors through a surjective map $C \to \overline{C}$. Then
$$
(x, \overline{C} \to A) \to (x, C \to A) \to (x, C' \to A)
$$
is a short exact sequence of deformation situations. The
associated splitting $\overline{C} = A[\Omega_{A/\Lambda}]$ (from
Remark \ref{remark-short-exact-sequence-thickenings}) equals the given
splitting above. Moreover, the section $A \to C$ composed with the map
$C \to \overline{C}$
is the map $(1, \text{d}) : A \to A[\Omega_{A/\Lambda}]$ of
Remark \ref{remark-canonical-element}.
Thus $x_C$ restricts to the canonical element $x_{can}$ of
$T_x(\Omega_{A/\Lambda}) = \text{Lift}(x, A[\Omega_{A/\Lambda}])$.
By condition (iv) we conclude that $o_x(P/J^2)$ maps to $\partial x_{can}$
in
$$
H^1(K^\bullet \otimes_A^\mathbf{L} \Im(J/J^2 \to \bigoplus A\text{d}x_i))
$$
By construction $\xi$ maps to $o_x(P/J^2)$. It follows that
$x_{can}$ and $\xi_{can}$ map to the same element in the
displayed group which means (by the long exact cohomology sequence)
that they differ by an element of
$H^1(K^\bullet \otimes_A^\mathbf{L} \bigoplus A\text{d}x_i)$
as desired.
\end{proof}

\begin{lemma}
\label{lemma-dual-openness}
In Situation \ref{situation-dual} assume that (iv) of
Lemma \ref{lemma-dual-obstruction} holds and that $K^\bullet$ is a
perfect object of $D(A)$. In this case, if $x$ is versal at a closed
point $u_0 \in U$ then there exists an open neighbourhood
$u_0 \in U' \subset U$ such that $x$ is versal at every finite type
point of $U'$.
\end{lemma}

\begin{proof}
We may assume that $K^\bullet$ is a finite complex of finite projective
$A$-modules. Thus the derived tensor product with $K^\bullet$ is the
same as simply tensoring with $K^\bullet$. Let
$E^\bullet$ be the dual perfect complex to $K^\bullet$, see
More on Algebra, Lemma \ref{more-algebra-lemma-dual-perfect-complex}.
(So $E^n = \Hom_A(K^{-n}, A)$ with differentials the transpose of the
differentials of $K^\bullet$.) Let $E \in D^{-}(A)$ denote the
object represented by the complex $E^\bullet[-1]$.
Let $\xi \in H^1(\text{Tot}(K^\bullet \otimes_A \NL_{A/\Lambda}))$
be the element constructed in Lemma \ref{lemma-dual-obstruction}
and denote $\xi : E = E^\bullet[-1] \to \NL_{A/\Lambda}$ the corresponding
map (loc.cit.). We claim that the pair $(E, \xi)$ satisfies all the
assumptions of Lemma \ref{lemma-openness} which finishes the proof.

\medskip\noindent
Namely, assumption (i) of Lemma \ref{lemma-openness} follows from conclusion
(1) of Lemma \ref{lemma-dual-obstruction}
and the fact that $H^2(K^\bullet \otimes_A^\mathbf{L} -) =
\Ext^1(E, -)$ by loc.cit. Assumption (ii) of
Lemma \ref{lemma-openness} follows from conclusion (2) of
Lemma \ref{lemma-dual-obstruction}
and the fact that $H^1(K^\bullet \otimes_A^\mathbf{L} -) =
\Ext^0(E, -)$ by loc.cit. Assumption (iii) of Lemma \ref{lemma-openness}
is clear.
\end{proof}







\section{Limit preserving functors on Noetherian schemes}
\label{section-noetherian}

\noindent
It is sometimes convenient to consider functors or stacks defined only
on the full subcategory of (locally) Noetherian schemes. In this section
we discuss this in the case of algebraic spaces.

\medskip\noindent
Let $S$ be a locally Noetherian scheme. Let us be a bit pedantic in order
to line up our categories correctly; people who are ignoring set theoretical
issues can just replace the sets of schemes we choose by the collection
of all schemes in what follows. As in
Topologies, Remark \ref{topologies-remark-choice-sites}
we choose a category $\Sch_\alpha$ of schemes containing
$S$ such that we obtain big sites $(\Sch/S)_{Zar}$,
$(\Sch/S)_\etale$, $(\Sch/S)_{smooth}$, $(\Sch/S)_{syntomic}$,
and $(\Sch/S)_{fppf}$ all with the same underlying
category $\Sch_\alpha/S$. Denote
$$
\textit{Noetherian}_\alpha \subset \Sch_\alpha
$$
the full subcategory consisting of locally Noetherian schemes.
This determines a full subcategory
$$
\textit{Noetherian}_\alpha/S \subset \Sch_\alpha/S
$$
For $\tau \in \{Zariski, \etale, smooth, syntomic, fppf\}$ we have
\begin{enumerate}
\item if $f : X \to Y$ is a morphism of $\Sch_\alpha/S$
with $Y$ in $\textit{Noetherian}_\alpha/S$ and
$f$ locally of finite type, then $X$ is in $\textit{Noetherian}_\alpha/S$,
\item for morphisms $f : X \to Y$ and $g : Z \to Y$ of
$\textit{Noetherian}_\alpha/S$ with $f$ locally of finite type
the fibre product $X \times_Y Z$ in $\textit{Noetherian}_\alpha/S$
exists and agrees with the fibre product in $\Sch_\alpha/S$,
\item if $\{X_i \to X\}_{i \in I}$ is a covering of
$(\Sch/S)_\tau$ and $X$ is in $\textit{Noetherian}_\alpha/S$,
then the objects $X_i$ are in $\textit{Noetherian}_\alpha/S$
\item the category $\textit{Noetherian}_\alpha/S$ endowed
with the set of coverings of $(\Sch/S)_\tau$ whose objects
are in $\textit{Noetherian}_\alpha/S$ is a site
we will denote $(\textit{Noetherian}/S)_\tau$,
\item the inclusion functor
$(\textit{Noetherian}/S)_\tau \to (\Sch/S)_\tau$
is fully faithful, continuous, and cocontinuous.
\end{enumerate}
By Sites, Lemmas \ref{sites-lemma-cocontinuous-morphism-topoi} and
\ref{sites-lemma-when-shriek} we obtain a morphism of topoi
$$
g_\tau : \Sh((\textit{Noetherian}/S)_\tau) \longrightarrow \Sh((\Sch/S)_\tau)
$$
whose pullback functor is the restriction of sheaves along
the inclusion functor $(\textit{Noetherian}/S)_\tau \to (\Sch/S)_\tau$.

\begin{remark}[Warning]
\label{remark-no-fibre-products}
The site $(\textit{Noetherian}/S)_\tau$ does not have fibre products.
Hence we have to be careful in working with sheaves. For example,
the continuous inclusion functor
$(\textit{Noetherian}/S)_\tau \to (\Sch/S)_\tau$
does not define a morphism of sites. See
Examples, Section \ref{examples-section-sheaves-locally-Noetherian}
for an example in case $\tau = fppf$.
\end{remark}

\noindent
Let $F : (\textit{Noetherian}/S)_\tau^{opp} \to \textit{Sets}$
be a functor. We say $F$ is {\it limit preserving} if for any
directed limit of affine schemes $X = \lim X_i$ of
$(\textit{Noetherian}/S)_\tau$ we have $F(X) = \colim F(X_i)$.

\begin{lemma}
\label{lemma-canonical-extension}
Let $\tau \in \{Zariski, \etale, smooth, syntomic, fppf\}$.
Restricting along the inclusion functor
$(\textit{Noetherian}/S)_\tau \to (\Sch/S)_\tau$
defines an equivalence of categories between
\begin{enumerate}
\item the category of limit preserving sheaves on
$(\Sch/S)_\tau$ and
\item the category of limit preserving sheaves on
$(\textit{Noetherian}/S)_\tau$
\end{enumerate}
\end{lemma}

\begin{proof}
Let $F : (\textit{Noetherian}/S)_\tau^{opp} \to \textit{Sets}$
be a functor which is both limit preserving and a sheaf.
By Topologies, Lemmas
\ref{topologies-lemma-extend} and \ref{topologies-lemma-extend-sheaf-general}
there exists a unique functor
$F' : (\Sch/S)_\tau^{opp} \to \textit{Sets}$
which is limit preserving, a sheaf, and restricts to $F$.
In fact, the construction of $F'$ in
Topologies, Lemma \ref{topologies-lemma-extend}
is functorial in $F$ and this construction is a quasi-inverse
to restriction. Some details omitted.
\end{proof}

\begin{lemma}
\label{lemma-representable-limit-preserving}
Let $X$ be an object of $(\textit{Noetherian}/S)_\tau$. If the functor
of points $h_X : (\textit{Noetherian}/S)_\tau^{opp} \to \textit{Sets}$
is limit preserving, then $X$ is locally of finite presentation over $S$.
\end{lemma}

\begin{proof}
Let $V \subset X$ be an affine open subscheme which maps into an affine
open $U \subset S$. We may write $V = \lim V_i$ as a directed limit of affine
schemes $V_i$ of finite presentation over $U$, see
Algebra, Lemma \ref{algebra-lemma-ring-colimit-fp}.
By assumption, the arrow $V \to X$ factors as $V \to V_i \to X$
for some $i$. After increasing $i$ we may assume $V_i \to X$
factors through $V$ as the inverse image of $V \subset X$ in $V_i$
eventually becomes equal to $V_i$ by
Limits, Lemma \ref{limits-lemma-descend-opens}.
Then the identity morphism $V \to V$ factors through $V_i$ for some $i$
in the category of schemes over $U$. Thus $V \to U$ is of finite presentation;
the corresponding algebra fact is that if $B$ is an $A$-algebra
such that $\text{id} : B \to B$ factors through a finitely presented
$A$-algebra, then $B$ is of finite presentation over $A$ (nice exercise).
Hence $X$ is locally of finite presentation over $S$.
\end{proof}

\noindent
The following lemma has a variant for transformations
representable by algebraic spaces.

\begin{lemma}
\label{lemma-representable}
Let $\tau \in \{Zariski, \etale, smooth, syntomic, fppf\}$.
Let $F', G' : (\Sch/S)_\tau^{opp} \to \textit{Sets}$ be limit preserving
and sheaves. Let $a' : F' \to G'$ be a transformation of functors.
Denote $a : F \to G$ the restriction of $a' : F' \to G'$ to
$(\textit{Noetherian}/S)_\tau$. The following are equivalent
\begin{enumerate}
\item $a'$ is representable (as a transformation of functors, see
Categories, Definition \ref{categories-definition-representable-morphism}), and
\item for every object $V$ of $(\textit{Noetherian}/S)_\tau$
and every map $V \to G$ the fibre product
$F \times_G V : (\textit{Noetherian}/S)_\tau^{opp} \to \textit{Sets}$
is a representable functor, and
\item same as in (2) but only for $V$ affine finite type over $S$
mapping into an affine open of $S$.
\end{enumerate}
\end{lemma}

\begin{proof}
Assume (1). By Limits of Spaces, Lemma
\ref{spaces-limits-lemma-locally-finite-presentation-permanence}
the transformation $a'$ is limit preserving\footnote{This
makes sense even if $\tau \not = fppf$ as the underlying
category of $(\Sch/S)_\tau$ equals the underlying category
of $(\Sch/S)_{fppf}$ and the statement doesn't refer to the topology.}.
Take $\xi : V \to G$ as in (2). Denote $V' = V$ but viewed as an
object of $(\Sch/S)_\tau$. Since $G$ is the restriction of
$G'$ to $(\textit{Noetherian}/S)_\tau$ we see that
$\xi \in G(V)$ corresponds to $\xi' \in G'(V')$.
By assumption $V' \times_{\xi', G'} F'$ is representable
by a scheme $U'$. The morphism of schemes $U' \to V'$ corresponding to
the projection $V' \times_{\xi', G'} F' \to V'$ is locally of finite
presentation by
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-base-change-locally-finite-presentation} and
Limits, Proposition
\ref{limits-proposition-characterize-locally-finite-presentation}.
Hence $U'$ is a locally Noetherian scheme and therefore $U'$ is
isomorphic to an object $U$ of $(\textit{Noetherian}/S)_\tau$.
Then $U$ represents $F \times_G V$ as desired.

\medskip\noindent
The implication (2) $\Rightarrow$ (3) is immediate. Assume (3).
We will prove (1). Let $T$ be an object of $(\Sch/S)_\tau$
and let $T \to G'$ be a morphism. We have to show
the functor $F' \times_{G'} T$ is representable by a scheme $X$
over $T$. Let $\mathcal{B}$ be the set of affine opens of
$T$ which map into an affine open of $S$. This is a basis
for the topology of $T$. Below we will show that for $W \in \mathcal{B}$
the fibre product $F' \times_{G'} W$ is representable
by a scheme $X_W$ over $W$. If $W_1 \subset W_2$ in $\mathcal{B}$, then
we obtain an isomorphism $X_{W_1} \to X_{W_2} \times_{W_2} W_1$ because both
$X_{W_1}$ and $X_{W_2} \times_{W_2} W_1$ represent the functor
$F' \times_{G'} W_1$.
These isomorphisms are canonical and satisfy the cocycle condition
mentioned in Constructions, Lemma
\ref{constructions-lemma-relative-glueing}.
Hence we can glue the schemes $X_W$ to a scheme $X$ over $T$.
Compatibility of the glueing maps with the maps
$X_W \to F'$ provide us with a map $X \to F'$.
The resulting map $X \to F' \times_{G'} T$ is an
isomorphism as we may check this locally on $T$ (as source
and target of this arrow are sheaves for the Zariski topology).

\medskip\noindent
Let $W$ be an affine scheme which maps into an affine open $U \subset S$.
Let $W \to G'$ be a map.
Still assuming (3) we have to show that $F' \times_{G'} W$
is representable by a scheme.
We may write $W = \lim V'_i$ as a directed limit of affine
schemes $V'_i$ of finite presentation over $U$, see
Algebra, Lemma \ref{algebra-lemma-ring-colimit-fp}.
Since $V'_i$ is of finite type over an Noetherian scheme,
we see that $V'_i$ is a Noetherian scheme.
Denote $V_i = V'_i$ but viewed as an object of
$(\textit{Noetherian}/S)_\tau$. As $G'$
is limit preserving can choose an $i$ and a map
$V'_i \to G'$ such that $W \to G'$ is the composition
$W \to V'_i \to G'$. Since $G$ is the restriction of $G'$
to $(\textit{Noetherian}/S)_\tau$ the morphism $V'_i \to G'$
is the same thing as a morphism $V_i \to G$ (see above).
By assumption (3) the functor $F \times_G V_i$ is representable by an object
$X_i$ of $(\textit{Noetherian}/S)_\tau$.
The functor $F \times_G V_i$ is limit preserving
as it is the restriction of $F' \times_{G'} V'_i$
and this functor is limit preserving by
Limits of Spaces, Lemma
\ref{spaces-limits-lemma-fibre-product-locally-finite-presentation},
the assumption that $F'$ and $G'$ are limit preserving, and
Limits, Remark \ref{limits-remark-limit-preserving} which
tells us that the functor of points of $V'_i$ is limit preserving.
By Lemma \ref{lemma-representable-limit-preserving}
we conclude that $X_i$ is locally of finite presentation over $S$.
Denote $X'_i = X_i$ but viewed as an object of
$(\Sch/S)_\tau$. Then we see that $F' \times_{G'} V'_i$
and the functors of points $h_{X'_i}$ are both extensions
of $h_{X_i} : (\textit{Noetherian}/S)_\tau^{opp} \to \textit{Sets}$
to limit preserving sheaves on $(\Sch/S)_\tau$.
By the equivalence of categories of Lemma \ref{lemma-canonical-extension}
we deduce that $X'_i$ represents $F' \times_{G'} V'_i$.
Then finally
$$
F' \times_{G'} W = F' \times_{G'} V'_i \times_{V'_i} W =
X'_i \times_{V'_i} W
$$
is representable as desired.
\end{proof}






\section{Algebraic spaces in the Noetherian setting}
\label{section-algebraic-spaces-noetherian}

\noindent
Let $S$ be a locally Noetherian scheme. Let
$(\textit{Noetherian}/S)_\etale \subset (\Sch/S)_\etale$
denote the site studied in Section \ref{section-noetherian}.
Let $F : (\textit{Noetherian}/S)_\etale^{opp} \to \textit{Sets}$
be a functor, i.e., $F$ is a presheaf on $(\textit{Noetherian}/S)_\etale$.
In this setting all the axioms [-1],  [0], [1], [2], [3], [4], [5] of
Section \ref{section-axioms-functors} make sense. We will review them
one by one and make sure the reader knows exactly what we mean.

\medskip\noindent
Axiom [-1]. This is a set theoretic condition to be ignored
by readers who are not interested in set theoretic questions.
It makes sense for $F$ since it concerns the evaluation of
$F$ on spectra of fields of finite type over $S$ which are
objects of $(\textit{Noetherian}/S)_\etale$.

\medskip\noindent
Axiom [0]. This is the axiom that $F$ is a sheaf
on $(\textit{Noetherian}/S)_\etale^{opp}$, i.e., satisfies
the sheaf condition for \'etale coverings.

\medskip\noindent
Axiom [1]. This is the axiom that $F$ is limit preserving as defined
in Section \ref{section-noetherian}:  for any
directed limit of affine schemes $X = \lim X_i$ of
$(\textit{Noetherian}/S)_\etale$ we have $F(X) = \colim F(X_i)$.

\medskip\noindent
Axiom [2]. This is the axiom that  $F$ satisfies the Rim-Schlessinger
condition (RS). Looking at the definition of condition (RS) in
Definition \ref{definition-RS} and the discussion in
Section \ref{section-axioms-functors}
we see that this means: given any pushout $Y' = Y \amalg_X X'$
of schemes of finite type over $S$ where $Y, X, X'$
are spectra of Artinian local rings, then
$$
F(Y \amalg_X X') \to F(Y) \times_{F(X)} F(X')
$$
is a bijection. This condition makes sense as the schemes
$X$, $X'$, $Y$, and $Y'$ are in $(\text{Noetherian}/S)_\etale$
since they are of finite type over $S$.

\medskip\noindent
Axiom [3]. This is the axiom that every tangent space $TF_{k, x_0}$
is finite dimensional. This makes sense as the tangent spaces $TF_{k, x_0}$
are constructed from evaluations of $F$ at $\Spec(k)$ and
$\Spec(k[\epsilon])$ with $k$ a field of finite type over $S$
and hence are obtained by evaluating at objects of the category
$(\textit{Noetherian}/S)_\etale$.

\medskip\noindent
Axiom [4]. This is axiom that the every formal object is effective.
Looking at the discussion in
Sections \ref{section-formal-objects} and \ref{section-axioms-functors}
we see that this involves evaluating our functor at Noetherian schemes
only and hence this condition makes sense for $F$.

\medskip\noindent
Axiom [5]. This is the axiom stating that $F$ satisfies openness of versality.
Recall that this means the following: Given a scheme $U$
locally of finite type over $S$, given $x \in F(U)$, and given
a finite type point $u_0 \in U$ such that $x$ is versal at $u_0$,
then there exists an open neighbourhood $u_0 \in U' \subset U$
such that $x$ is versal at every finite type point of $U'$.
As before, verifying this only involves evaluating
our functor at Noetherian schemes.

\begin{proposition}
\label{proposition-spaces-diagonal-representable-noetherian}
Let $S$ be a locally Noetherian scheme. Let
$F : (\textit{Noetherian}/S)_\etale^{opp} \to \textit{Sets}$
be a functor. Assume that
\begin{enumerate}
\item $\Delta : F \to F \times F$ is representable
(as a transformation of functors, see
Categories, Definition \ref{categories-definition-representable-morphism}),
\item $F$ satisfies axioms [-1], [0], [1], [2], [3], [4], [5]
(see above), and
\item $\mathcal{O}_{S, s}$ is a G-ring for all finite type points $s$ of $S$.
\end{enumerate}
Then there exists a unique algebraic space
$F' : (\Sch/S)_{fppf}^{opp} \to \textit{Sets}$
whose restriction to $(\textit{Noetherian}/S)_\etale$ is $F$
(see proof for elucidation).
\end{proposition}

\begin{proof}
Recall that the sites $(\Sch/S)_{fppf}$ and $(\Sch/S)_\etale$ have the same
underlying category, see discussion in Section \ref{section-noetherian}.
Similarly the sites $(\textit{Noetherian}/S)_\etale$ and
$(\textit{Noetherian}/S)_{fppf}$ have the same underlying categories.
By axioms [0] and [1] the functor $F$ is a sheaf and
limit preserving.
Let $F' : (\Sch/S)_\etale^{opp} \to \textit{Sets}$
be the unique extension of $F$ which is a sheaf (for the \'etale topology)
and which is limit preserving, see
Lemma \ref{lemma-canonical-extension}.
Then $F'$ satisfies axioms [0] and [1] as given in
Section \ref{section-axioms-functors}.
By Lemma \ref{lemma-representable} we see that
$\Delta' : F' \to F' \times F'$ is representable (by schemes).
On the other hand, it is immediately clear that
$F'$ satisfies axioms [-1], [2], [3], [4], [5] of
Section \ref{section-axioms-functors}
as each of these involves only evaluating $F'$ at objects
of $(\textit{Noetherian}/S)_\etale$ and we've assumed the
corresponding conditions for $F$.
Whence $F'$ is an algebraic space by
Proposition \ref{proposition-spaces-diagonal-representable}.
\end{proof}












\section{Artin's theorem on contractions}
\label{section-contractions}

\noindent
In this section we will freely use the language of formal algebraic spaces,
see Formal Spaces, Section \ref{formal-spaces-section-introduction}.
Artin's theorem on contractions is one of the two main theorems of
Artin's paper \cite{ArtinII}; the first one is his theorem on dilatations
which we stated and proved in Algebraization of Formal Spaces,
Section \ref{restricted-section-dilatations}.

\begin{situation}
\label{situation-contractions}
Let $S$ be a locally Noetherian scheme. Let $X'$ be an algebraic space
locally of finite type over $S$. Let $T' \subset |X'|$ be a closed
subset. Let $U' \subset X'$ be the open subspace with
$|U'| = |X'| \setminus T'$. Let $W$ be a locally Noetherian
formal algebraic space over $S$ with $W_{red}$ locally of finite type
over $S$. Finally, we let
$$
g : X'_{/T'} \longrightarrow W
$$
be a formal modification, see
Algebraization of Formal Spaces, Definition
\ref{restricted-definition-formal-modification}.
Recall that $X'_{/T'}$ denotes the formal completion of $X'$ along
$T'$, see Formal Spaces, Section \ref{formal-spaces-section-completion}.
\end{situation}

\noindent
In the situation above our goal is to prove that there exists a
proper morphism $f : X' \to X$ of algebraic spaces over $S$,
a closed subset $T \subset |X|$, and an isomorphism
$a : X_{/T} \to W$ of formal algebraic spaces such that
\begin{enumerate}
\item $T'$ is the inverse image of $T$ by $|f| : |X'| \to |X|$,
\item $f : X' \to X$ maps $U'$ isomorphically to
an open subspace $U$ of $X$, and
\item $g = a \circ f_{/T}$ where $f_{/T} : X'_{/T'} \to X_{/T}$
is the induced morphism.
\end{enumerate}
Let us say that $(f : X' \to X, T, a)$ is a {\it solution}.

\medskip\noindent
We will follow Artin's strategy by constructing a functor $F$ on
the category of locally Noetherian schemes over $S$, showing that $F$ is an
algebraic space using
Proposition \ref{proposition-spaces-diagonal-representable-noetherian},
and proving that setting $X = F$ works.

\begin{remark}
\label{remark-G-rings}
In particular, we cannot prove that the desired result is true for
every Situation \ref{situation-contractions} because we will need to
assume the local rings of $S$ are G-rings. If you can prove the
result in general or if you have a counter example, please let
us know at
\href{mailto:stacks.project@gmail.com}{stacks.project@gmail.com}.
\end{remark}

\noindent
In Situation \ref{situation-contractions}
let $V$ be a locally Noetherian scheme over $S$.
The value of our functor $F$ on $V$ will be all triples
$$
(Z, u' : V \setminus Z \to U', \hat x : V_{/Z} \to W)
$$
satisfying the following conditions
\begin{enumerate}
\item $Z \subset V$ is a closed subset,
\item $u' : V \setminus Z \to U'$ is a morphism over $S$,
\item $\hat x : V_{/Z} \to W$ is an adic morphism of formal algebraic
spaces over $S$,
\item $u'$ and $\hat x$ are compatible (see below).
\end{enumerate}
The compatibility condition is the following: pulling back the
formal modification $g$ we obtain a formal modification
$$
X'_{/T'} \times_{g, W, \hat x} V_{/Z} \longrightarrow V_{/Z}
$$
See Algebraization of Formal Spaces, Lemma
\ref{restricted-lemma-base-change-formal-modification}.
By the main theorem on dilatations
(Algebraization of Formal Spaces, Theorem
\ref{restricted-theorem-dilatations}), there is a unique proper
morphism $V' \to V$ of algebraic spaces which is an isomorphism over
$V \setminus Z$ such that $V'_{/Z} \to V_{/Z}$ is isomorphic to the
displayed arrow. In other words, for some morphism
$\hat x' : V'_{/Z} \to X'_{/T'}$ we have a cartesian diagram
$$
\xymatrix{
V'_{/Z} \ar[r] \ar[d]_{\hat x'} & V_{/Z} \ar[d]^{\hat x} \\
X'_{/T'} \ar[r]^g & W
}
$$
of formal algebraic spaces. We will think
of $V \setminus Z$ as an open subspace of $V'$ without further mention.
The compatibility condition is that there should be a
morphism $x' : V' \to X'$ restricting to $u'$ and $\hat x$
over $V \setminus Z \subset V'$ and $V'_{/Z}$.
In other words, such that the diagram
$$
\xymatrix{
V \setminus Z \ar[r] \ar[d]_{u'} &
V' \ar[d]^{x'} &
V'_{/Z} \ar[l] \ar[d]^{\hat x'} \ar[r] &
V_{/Z} \ar[d]^{\hat x} \\
U' \ar[r] &
X' &
X'_{/T'} \ar[r]^g \ar[l] &
W
}
$$
is commutative. Observe that by Algebraization of Formal Spaces,
Lemma \ref{restricted-lemma-faithful} the morphism $x'$ is unique
if it exists. We will indicate this situation by saying
``{\it $V' \to V$, $\hat x'$, and $x'$ witness the compatibility
between $u'$ and $\hat x$}''.

\begin{remark}
\label{remark-how-to-think-compatibility}
In Situation \ref{situation-contractions} let $V$ be a locally Noetherian
scheme over $S$. Let $(Z, u', \hat x)$ be a triple satisfying (1), (2), and
(3) above. We want to explain a way to think about the compatibility
condition (4). It will not be mathematically precise as we are going use
a fictitious category $\textit{An}_S$ of analytic spaces over $S$
and a fictitious analytification functor
$$
\left\{
\begin{matrix}
\text{locally Noetherian formal} \\
\text{algebraic spaces over }S
\end{matrix}
\right\}
\longrightarrow
\textit{An}_S,
\quad\quad
Y \longmapsto Y^{an}
$$
For example if $Y = \text{Spf}(k[[t]])$ over $S = \Spec(k)$, then $Y^{an}$
should be thought of as an open unit disc. If $Y = \Spec(k)$, then $Y^{an}$
is a single point. The category $\textit{An}_S$ should have open and
closed immersions and we should be able to take the open complement
of a closed. Given $Y$ the morphism $Y_{red} \to Y$ should induces a
closed immersion $Y_{red}^{an} \to Y^{an}$. We set
$Y^{rig} = Y^{an} \setminus Y_{red}^{an}$ equal to its open complement.
If $Y$ is an algebraic space and if $Z \subset Y$ is closed, then
the morphism $Y_{/Z} \to Y$ should induce an open immersion
$Y_{/Z}^{an} \to Y^{an}$ which in turn should induce an open immersion
$$
can : (Y_{/Z})^{rig} \longrightarrow (Y \setminus Z)^{an}
$$
Also, given a formal modification $g : Y' \to Y$ of locally Noetherian formal
algebraic spaces, the induced morphism $g^{rig} : (Y')^{rig} \to Y^{rig}$
should be an isomorphism. Given $\text{An}_S$ and the analytification
functor, we can consider the requirement that
$$
\xymatrix{
(V_{/Z})^{rig} \ar[rr]_{can} \ar[d]_{(g^{rig})^{-1} \circ \hat x^{an}} & &
(V \setminus Z)^{an} \ar[d]^{(u')^{an}} \\
(X'_{/T'})^{rig} \ar[rr]^{can} & & (X' \setminus T')^{an}
}
$$
commutes. This makes sense as $g^{rig} : (X'_{T'})^{rig} \to W^{rig}$
is an isomorphism and $U' = X' \setminus T'$. Finally, under some assumptions
of faithfulness of the analytification functor, this requirement will
be equivalent to the compatibility condition formulated above.
We hope this will motivate the reader to think of the compatibility
of $u'$ and $\hat x$ as the requirement that some maps be equal,
rather than asking for the existence of a certain commutative diagram.
\end{remark}

\begin{lemma}
\label{lemma-functor}
In Situation \ref{situation-contractions} the rule $F$ that sends
a locally Noetherian scheme $V$ over $S$ to the set of triples
$(Z, u', \hat x)$ satisfying the compatibility condition and which sends a
a morphism $\varphi : V_2 \to V_1$ of locally Noetherian schemes over $S$
to the map
$$
F(\varphi) : F(V_1) \longrightarrow F(V_2)
$$
sending an element $(Z_1, u'_1, \hat x_1)$ of $F(V_1)$ to
$(Z_2, u'_2, \hat x_2)$ in $F(V_2)$ given by
\begin{enumerate}
\item $Z_2 \subset V_2$ is the inverse image of $Z_1$ by $\varphi$,
\item $u'_2$ is the composition of $u'_1$ and
$\varphi|_{V_2 \setminus Z_2} : V_2 \setminus Z_2 \to V_1 \setminus Z_1$,
\item $\hat x_2$ is the composition of $\hat x_1$ and
$\varphi_{/Z_2} : V_{2, /Z_2} \to V_{1, /Z_1}$
\end{enumerate}
is a contravariant functor.
\end{lemma}

\begin{proof}
To see the compatibility condition between $u'_2$ and $\hat x_2$, let
$V'_1 \to V_1$, $\hat x'_1$, and $x'_1$ witness the compatibility between
$u'_1$ and $\hat x_1$. Set $V'_2 = V_2 \times_{V_1} V'_1$, set
$\hat x'_2$ equal to the composition of $\hat x'_1$ and
$V'_{2, /Z_2} \to V'_{1, /Z_1}$, and set $x'_2$
equal to the composition of $x'_1$ and $V'_2 \to V'_1$.
Then $V'_2 \to V_2$, $\hat x'_2$, and $x'_2$ witness the compatibility between
$u'_2$ and $\hat x_2$. We omit the detailed verification.
\end{proof}

\begin{lemma}
\label{lemma-solution}
In Situation \ref{situation-contractions} if there exists a solution
$(f : X' \to X, T, a)$ then there is a functorial bijection
$F(V) = \Mor_S(V, X)$ on the category of
locally Noetherian schemes $V$ over $S$.
\end{lemma}

\begin{proof}
Let $V$ be a locally Noetherian scheme over $S$.
Let $x : V \to X$ be a morphism over $S$.
Then we get an element $(Z, u', \hat x)$ in $F(V)$ as follows
\begin{enumerate}
\item $Z \subset V$ is the inverse image of $T$ by $x$,
\item $u' : V \setminus Z \to U' = U$ is the restriction of
$x$ to $V \setminus Z$,
\item $\hat x : V_{/Z} \to W$ is the composition of
$x_{/Z} : V_{/Z} \to X_{/T}$ with the isomorphism $a : X_{/T} \to W$.
\end{enumerate}
This triple satisfies the compatibility condition because we
can take $V' = V \times_{x, X} X'$, we can take $\hat x'$
the completion of the projection $x' : V' \to X'$.

\medskip\noindent
Conversely, suppose given an element $(Z, u', \hat x)$ of $F(V)$. We claim
there is a unique morphism $x : V \to X$ compatible with $u'$ and $\hat x$.
Namely, let $V' \to V$, $\hat x'$, and $x'$ witness the
compatibility between $u'$ and $\hat x$. Then
Algebraization of Formal Spaces, Proposition
\ref{restricted-proposition-glue-modification}
is exactly the result we need to find
a unique morphism $x : V \to X$ agreeing with
$\hat x$ over $V_{/Z}$ and with $x'$ over $V'$ (and a fortiori
agreeing with $u'$ over $V \setminus Z$).

\medskip\noindent
We omit the verification that the two constructions above define inverse
bijections between their respective domains.
\end{proof}

\begin{lemma}
\label{lemma-functor-is-solution}
In Situation \ref{situation-contractions} if there exists an
algebraic space $X$ locally of finite type over $S$ and a
functorial bijection $F(V) = \Mor_S(V, X)$ on the category of
locally Noetherian schemes $V$ over $S$, then $X$ is a solution.
\end{lemma}

\begin{proof}
We have to construct a proper morphism $f : X' \to X$, a closed subset
$T \subset |X|$, and an isomorphism $a : X_{/T} \to W$ with properties
(1), (2), (3) listed just below Situation \ref{situation-contractions}.

\medskip\noindent
The discussion in this proof is a bit pedantic because we want
to carefully match the underlying categories. In this paragraph
we explain how the adventurous reader can proceed less timidly.
Namely, the reader may extend our definition of the functor $F$
to all locally Noetherian algebraic spaces over $S$.
Doing so the reader may then conclude that $F$ and $X$ agree as
functors on the category of these algebraic spaces, i.e.,
$X$ represents $F$. Then one considers the universal object
$(T, u', \hat x)$ in $F(X)$. Then the reader will find that
for the triple $X'' \to X$, $\hat x'$, $x'$ witnessing the compatibility
between $u'$ and $\hat x$ the morphism $x' : X'' \to X'$ is an isomorphism
and this will produce $f : X' \to X$ by inverting $x'$. Finally, we already
have $T \subset |X|$ and the reader may show that $\hat x$ is an isomorphism
which can served as the last ingredient namely $a$.

\medskip\noindent
Denote $h_X(-) = \Mor_S(-, X)$ the functor of
points of $X$ restricted to the category
$(\textit{Noetherian}/S)_\etale$ of Section \ref{section-noetherian}.
By Limits of Spaces, Remark \ref{spaces-limits-remark-limit-preserving}
the algebraic spaces $X$ and $X'$ are limit preserving. Hence so
are the restrictions $h_X$ and $h_{X'}$.
To construct $f$ it therefore suffices to construct a
transformation $h_{X'} \to h_X = F$, see Lemma \ref{lemma-canonical-extension}.
Thus let $V \to S$ be an object of $(\textit{Noetherian}/S)_\etale$
and let $\tilde x : V \to X'$ be in $h_{X'}(V)$.
Then we get an element $(Z, u', \hat x)$ in $F(V)$ as follows
\begin{enumerate}
\item $Z \subset V$ is the inverse image of $T'$ by $\tilde x$,
\item $u' : V \setminus Z \to U'$ is the restriction of
$\tilde x$ to $V \setminus Z$,
\item $\hat x : V_{/Z} \to W$ is the composition of
$x_{/Z} : V_{/Z} \to X'_{/T'}$ with $g : X'_{/T'} \to W$.
\end{enumerate}
This triple satisfies the compatibility condition: first we always
obtain $V' \to V$ and $\hat x' : V'_{/Z'} \to X'_{/T'}$ for free
(see discussion preceding Lemma \ref{lemma-functor}).
Then we just define $x' : V' \to X'$ to be the composition
of $V' \to V$ and the morphism $\tilde x : V \to X'$.
We omit the verification that this works.

\medskip\noindent
If $\xi : V \to X$ is an \'etale morphism where $V$ is a scheme, then
we obtain $\xi = (Z, u', \hat x) \in F(V) = h_X(V) = X(V)$.
Of course, if $\varphi : V' \to V$ is a further \'etale morphism of schemes,
then $(Z, u', \hat x)$ pulled back to $F(V')$ corresponds to
$\xi \circ \varphi$.
The closed subset $T \subset |X|$ is just defined as the closed
subset such that $\xi : V \to X$ for $\xi = (Z, u', \hat x)$
pulls $T$ back to $Z$

\medskip\noindent
Consider Noetherian schemes $V$ over $S$ and a morphism
$\xi : V \to X$ corresponding to $(Z, u', \hat x)$ as above.
Then we see that $\xi(V)$ is set theoretically contained in $T$
if and only if $V = Z$ (as topological spaces). Hence we see that
$X_{/T}$ agrees with $W$ as a functor. This produces the isomorphism
$a : X_{/T} \to W$. (We've omitted a small detail here which is
that for the locally Noetherian formal algebraic spaces $X_{/T}$ and
$W$ it suffices to check one gets an isomorphism after evaluating
on locally Noetherian schemes over $S$.)

\medskip\noindent
We omit the proof of conditions (1), (2), and (3).
\end{proof}

\begin{remark}
\label{remark-diagonal}
In Situation \ref{situation-contractions}.
Let $V$ be a locally Noetherian scheme over $S$.
Let $(Z_i, u'_i, \hat x_i) \in F(V)$ for $i = 1, 2$. Let $V'_i \to V$,
$\hat x'_i$ and $x'_i$ witness the compatibility between $u'_i$ and
$\hat x_i$ for $i = 1, 2$.

\medskip\noindent
Set $V' = V'_1 \times_V V'_2$. Let $E' \to V'$ denote the equalizer
of the morphisms
$$
V' \to V'_1 \xrightarrow{x'_1} X'
\quad\text{and}\quad
V' \to V'_2 \xrightarrow{x'_2} X'
$$
Set $Z = Z_1 \cap Z_2$. Let $E_W \to V_{/Z}$
be the equalizer of the morphisms
$$
V_{/Z} \to V_{/Z_1} \xrightarrow{\hat x_1} W
\quad\text{and}\quad
V_{/Z} \to V_{/Z_2} \xrightarrow{\hat x_2} W
$$
Observe that $E' \to V$ is separated and locally of finite type
and that $E_W$ is a locally Noetherian formal algebraic space
separated over $V$.
The compatibilities between the various morphisms involved show that
\begin{enumerate}
\item $\Im(E' \to V) \cap (Z_1 \cup Z_2)$
is contained in $Z = Z_1 \cap Z_2$, 
\item the morphism $E' \times_V (V \setminus Z) \to V \setminus Z$
is a monomorphism and is equal to the equalizer of the restrictions
of $u'_1$ and $u'_2$ to $V \setminus (Z_1 \cup Z_2)$,
\item the morphism $E'_{/Z} \to V_{/Z}$ factors through $E_W$
and the diagram
$$
\xymatrix{
E'_{/Z} \ar[r] \ar[d] & X'_{/T'} \ar[d]^g \\
E_W \ar[r] & W
}
$$
is cartesian. In particular, the morphism $E'_{/Z} \to E_W$
is a formal modification as the base change of $g$,
\item $E'$, $(E' \to V)^{-1}Z$, and $E'_{/Z} \to E_W$
is a triple as in Situation \ref{situation-contractions}
with base scheme the locally Noetherian scheme $V$,
\item given a morphism $\varphi : A \to V$
of locally Noetherian schemes, the following are equivalent
\begin{enumerate}
\item $(Z_1, u'_1, \hat x_1)$ and $(Z_2, u'_2, \hat x_2)$
restrict to the same element of $F(A)$,
\item $A \setminus \varphi^{-1}(Z) \to V \setminus Z$
factors through $E' \times_V (V \setminus Z)$
and $A_{/\varphi^{-1}(Z)} \to V_{/Z}$
factors through $E_W$.
\end{enumerate}
\end{enumerate}
We conclude, using
Lemmas \ref{lemma-solution} and \ref{lemma-functor-is-solution},
that if there is a solution $E \to V$
for the triple in (4), then $E$ represents
$F \times_{\Delta, F \times F} V$ on the category of
locally Noetherian schemes over $V$.
\end{remark}

\begin{lemma}
\label{lemma-closed-immersion}
In Situation \ref{situation-contractions} assume given a closed
subset $Z \subset S$ such that
\begin{enumerate}
\item the inverse image of $Z$ in $X'$ is $T'$,
\item $U' \to S \setminus Z$ is a closed immersion,
\item $W \to S_{/Z}$ is a closed immersion.
\end{enumerate}
Then there exists a solution $(f : X' \to X, T, a)$
and moreover $X \to S$ is a closed immersion.
\end{lemma}

\begin{proof}
Suppose we have a closed subscheme $X \subset S$ such that
$X \cap (S \setminus Z) = U'$ and $X_{/Z} = W$. Then
$X$ represents the functor $F$ (some details omitted) and hence 
is a solution. To find $X$ is clearly a local question on $S$.
In this way we reduce to the case discussed in the next paragraph.

\medskip\noindent
Assume $S = \Spec(A)$ is affine. Let $I \subset A$ be the
radical ideal cutting out $Z$.
Write $I = (f_1, \ldots, f_r)$. By assumption we are given
\begin{enumerate}
\item the closed immersion $U' \to S \setminus Z$ determines
ideals $J_i \subset A[1/f_i]$ such that $J_i$ and $J_j$
generate the same ideal in $A[1/f_if_j]$,
\item the closed immersion $W \to S_{/Z}$ is the map
$\text{Spf}(A^\wedge/J') \to \text{Spf}(A^\wedge)$ for some
ideal $J' \subset A^\wedge$ in the $I$-adic completion $A^\wedge$ of $A$.
\end{enumerate}
To finish the proof we need to find an ideal $J \subset A$
such that $J_i = J[1/f_i]$ and $J' = JA^\wedge$. By
More on Algebra, Proposition \ref{more-algebra-proposition-equivalence}
it suffices to show that $J_i$ and $J'$ generate the same ideal
in $A^\wedge[1/f_i]$ for all $i$.

\medskip\noindent
Recall that $A' = H^0(X', \mathcal{O})$ is a finite $A$-algebra
whose formation commutes with flat base change
(Cohomology of Spaces, Lemmas
\ref{spaces-cohomology-lemma-proper-over-affine-cohomology-finite} and
\ref{spaces-cohomology-lemma-flat-base-change-cohomology}). Denote
$J'' = \Ker(A \to A')$\footnote{Contrary to what the reader
may expect, the ideals $J$ and $J''$ won't agree in general.}.
We have $J_i = J''A[1/f_i]$ as follows
from base change to the spectrum of $A[1/f_i]$.
Observe that we have a commutative diagram
$$
\xymatrix{
X' \ar[d] &
X'_{/T'} \times_{S_{/Z}} \text{Spf}(A^\wedge) \ar[l] \ar[d] &
X'_{/T'} \times_W \text{Spf}(A^\wedge/J') \ar@{=}[l] \ar[d] \\
\Spec(A) &
\text{Spf}(A^\wedge) \ar[l] &
\text{Spf}(A^\wedge/J') \ar[l]
}
$$
The middle vertical arrow is the completion of the left vertical
arrow along the obvious closed subsets. By the theorem on formal
functions we have
$$
(A')^\wedge = \Gamma(X' \times_S \Spec(A^\wedge), \mathcal{O}) =
\lim H^0(X' \times_S \Spec(A/I^n), \mathcal{O})
$$
See Cohomology of Spaces, Theorem
\ref{spaces-cohomology-theorem-formal-functions}.
From the diagram we conclude that $J'$ maps to zero in $(A')^\wedge$.
Hence $J' \subset J'' A^\wedge$. Consider the arrows
$$
X'_{/T'} \to
\text{Spf}(A^\wedge/J''A^\wedge) \to
\text{Spf}(A^\wedge/J') = W
$$
We know the composition $g$ is a formal modification
(in particular rig-\'etale and rig-surjective) and the second
arrow is a closed immersion (in particular an adic monomorphism).
Hence $X'_{/T'} \to \text{Spf}(A^\wedge/J''A^\wedge)$ is
rig-surjective and rig-\'etale, see
Algebraization of Formal Spaces, Lemmas
\ref{restricted-lemma-rig-surjective-alternative-permanence} and
\ref{restricted-lemma-rig-etale-alternative-permanence}.
Applying Algebraization of Formal Spaces, Lemmas
\ref{restricted-lemma-rig-etale-descent} and
\ref{restricted-lemma-permanence-rig-surjective}
we conclude that $\text{Spf}(A^\wedge/J''A^\wedge) \to W$
is rig-\'etale and rig-surjective.
By Algebraization of Formal Spaces, Lemma
\ref{restricted-lemma-closed-immersion-rig-smooth-rig-surjective}
we conclude that $I^n J'' A^\wedge \subset J'$ for some $n > 0$.
It follows that $J'' A^\wedge[1/f_i] = J' A^\wedge[1/f_i]$ and
we deduce $J_i A^\wedge[1/f_i] = J' A^\wedge[1/f_i]$ for all
$i$ as desired.
\end{proof}

\begin{lemma}
\label{lemma-diagonal-contractions}
In Situation \ref{situation-contractions} assume $X' \to S$
and $W \to S$ are separated. Then the diagonal $\Delta : F \to F \times F$
is representable by closed immersions.
\end{lemma}

\begin{proof}
Combine Lemma \ref{lemma-closed-immersion}
with the discussion in Remark \ref{remark-diagonal}.
\end{proof}

\begin{lemma}
\label{lemma-sheaf}
In Situation \ref{situation-contractions} the functor
$F$ satisfies the sheaf property for all \'etale coverings
of locally Noetherian schemes over $S$.
\end{lemma}

\begin{proof}
Omitted. Hint: morphisms may be defined \'etale locally.
\end{proof}

\begin{lemma}
\label{lemma-limit-preserving}
In Situation \ref{situation-contractions} the functor $F$ is limit preserving:
for any directed limit $V = \lim V_\lambda$ of Noetherian affine schemes
over $S$ we have $F(V) = \colim F(V_\lambda)$.
\end{lemma}

\begin{proof}
This is an absurdly long proof. Much of it consists of standard
arguments on limits and \'etale localization. We urge the reader to skip ahead
to the last part of the proof where something interesting happens.

\medskip\noindent
Let $V = \lim_{\lambda \in \Lambda} V_i$ be a directed limit of schemes
over $S$ with $V$ and $V_\lambda$ Noetherian and with affine transition
morphisms. See Limits, Section \ref{limits-section-limits} for material on
limits of schemes. We will prove that $\colim F(V_\lambda) \to F(V)$
is bijective.

\medskip\noindent
Proof of injectivity: notation.
Let $\lambda \in \Lambda$ and
$\xi_{\lambda, 1}, \xi_{\lambda, 2} \in F(V_\lambda)$ 
be elements which restrict to the same element of $F(V)$.
Write $\xi_{\lambda, 1} = (Z_{\lambda, 1}, u'_{\lambda, 1},
\hat x_{\lambda, 1})$ and
$\xi_{\lambda, 2} = (Z_{\lambda, 2}, u'_{\lambda, 2}, \hat x_{\lambda, 2})$.

\medskip\noindent
Proof of injectivity: agreement of $Z_{\lambda, i}$.
Since $Z_{\lambda, 1}$ and $Z_{\lambda, 2}$ restrict to the same closed
subset of $V$, we may after increasing $i$ assume
$Z_{\lambda, 1} = Z_{\lambda, 2}$, see
Limits, Lemma \ref{limits-lemma-inverse-limit-top} and
Topology, Lemma \ref{topology-lemma-describe-limits}.
Let us denote the common value $Z_\lambda \subset V_\lambda$, for
$\mu \geq \lambda$
denote $Z_\mu \subset V_\mu$ the inverse image in $V_\mu$ and
and denote $Z$ the inverse image in $V$. We will use below that
$Z = \lim_{\mu \geq \lambda} Z_\mu$ as schemes if we view $Z$
and $Z_\mu$ as reduced closed subschemes.

\medskip\noindent
Proof of injectivity: agreement of $u'_{\lambda, i}$.
Since $U'$ is locally of finite type over $S$ and since
the restrictions of $u'_{\lambda, 1}$ and $u'_{\lambda, 2}$
to $V \setminus Z$ are the same, we may after increasing $\lambda$ assume
$u'_{\lambda, 1} = u'_{\lambda, 2}$, see Limits, Proposition
\ref{limits-proposition-characterize-locally-finite-presentation}.
Let us denote the common value $u'_\lambda$ and denote
$u'$ the restriction to $V \setminus Z$.

\medskip\noindent
Proof of injectivity: restatement.
At this point we have
$\xi_{\lambda, 1} = (Z_\lambda, u'_\lambda, \hat x_{\lambda, 1})$ and
$\xi_{\lambda, 2} = (Z_\lambda, u'_\lambda, \hat x_{\lambda, 2})$.
The main problem we face in this part of the proof
is to show that the morphisms
$\hat x_{\lambda, 1}$ and $\hat x_{\lambda, 2}$ become the same after
increasing $\lambda$.

\medskip\noindent
Proof of injectivity: agreement of $\hat x_{\lambda, i}|_{Z_\lambda}$.
Consider the morpisms
$\hat x_{\lambda, 1}|_{Z_\lambda}, \hat x_{\lambda, 2}|_{Z_\lambda} :
Z_\lambda \to W_{red}$.
These morphisms restrict to the same morphism $Z \to W_{red}$.
Since $W_{red}$ is a scheme locally of finite type over $S$
we see using Limits, Proposition
\ref{limits-proposition-characterize-locally-finite-presentation}
that after replacing $\lambda$ by a bigger index
we may assume
$\hat x_{\lambda, 1}|_{Z_\lambda} = \hat x_{\lambda, 2}|_{Z_\lambda} :
Z_\lambda \to W_{red}$.

\medskip\noindent
Proof of injectivity: end.
Next, we are going to apply the discussion in
Remark \ref{remark-diagonal} to $V_\lambda$ and the two elements
$\xi_{\lambda, 1}, \xi_{\lambda, 2} \in F(V_\lambda)$.
This gives us
\begin{enumerate}
\item $e_\lambda : E_\lambda' \to V_\lambda$
separated and locally of finite type,
\item $e_\lambda^{-1}(V_\lambda \setminus Z_\lambda) \to
V_\lambda \setminus Z_\lambda$ is an isomorphism,
\item a monomorphism $E_{W, \lambda} \to V_{\lambda, /Z_\lambda}$
which is the equalizer of $\hat x_{\lambda, 1}$ and $\hat x_{\lambda, 2}$,
\item a formal modification $E'_{\lambda, /Z_\lambda} \to E_{W, \lambda}$
\end{enumerate}
Assertion (2) holds by assertion (2) in Remark \ref{remark-diagonal}
and the preparatory work we did above getting
$u'_{\lambda, 1} = u'_{\lambda, 2} = u'_\lambda$.
Since $Z_\lambda = (V_{\lambda, /Z_\lambda})_{red}$ factors through
$E_{W, \lambda}$ because
$\hat x_{\lambda, 1}|_{Z_\lambda} = \hat x_{\lambda, 2}|_{Z_\lambda}$
we see from
Formal Spaces, Lemma \ref{formal-spaces-lemma-monomorphism-iso-over-red}
that $E_{W, \lambda} \to V_{\lambda, /Z_\lambda}$ is a closed immersion.
Then we see from assertion (4) in Remark \ref{remark-diagonal}
and Lemma \ref{lemma-closed-immersion} applied to the triple
$E_\lambda'$, $e_\lambda^{-1}(Z_\lambda)$,
$E'_{\lambda, /Z_\lambda} \to E_{W, \lambda}$ over $V_\lambda$ that
there exists a closed immersion $E_\lambda \to V_\lambda$
which is a solution for this triple.
Next we use assertion (5) in Remark \ref{remark-diagonal}
which combined with Lemma \ref{lemma-solution}
says that $E_\lambda$ is the ``equalizer'' of $\xi_{\lambda, 1}$
and $\xi_{\lambda, 2}$. In particular, we see that $V \to V_\lambda$
factors through $E_\lambda$. Then using Limits, Proposition
\ref{limits-proposition-characterize-locally-finite-presentation}
once more we find $\mu \geq \lambda$ such that $V_\mu \to V_\lambda$
factors through $E_\lambda$ and hence the pullbacks of
$\xi_{\lambda, 1}$ and $\xi_{\lambda, 2}$ to $V_\mu$ are the same
as desired.

\medskip\noindent
Proof of surjectivity: statement.
Let $\xi = (Z, u', \hat x)$ be an element of $F(V)$.
We have to find a $\lambda \in \Lambda$ and an element
$\xi_\lambda \in F(V_\lambda)$ restricting to $\xi$.

\medskip\noindent
Proof of surjectivity: the question is \'etale local.
By the unicity proved in the previous part of the proof and by the
sheaf property of $F$ in Lemma \ref{lemma-sheaf}, the problem
is local on $V$ in the \'etale topology. More precisely, let $v \in V$.
We claim it suffices to find an \'etale morphism
$(\tilde V, \tilde v) \to (V, v)$ and some
$\lambda$, some an \'etale morphism $\tilde V_\lambda \to V_\lambda$,
and some element $\tilde \xi_\lambda \in F(\tilde V_\lambda)$ such that
$\tilde V = \tilde V_\lambda \times_{V_\lambda} V$
and $\xi|_U = \tilde \xi_\lambda|_U$. We omit a detailed proof of
this claim\footnote{To prove this
one assembles a collection of the morphisms $\tilde V \to V$
into a finite \'etale covering and shows that the corresponding morphisms
$\tilde V_\lambda \to V_\lambda$ form an \'etale covering as well (after
increasing $\lambda$). Next one uses the injectivity to see that
the elements $\tilde \xi_\lambda$ glue (after increasing $\lambda$)
and one uses the sheaf property for $F$ to descend these
elements to an element of $F(V_\lambda)$.}.

\medskip\noindent
Proof of surjectivity: rephrasing the problem.
Recall that any \'etale morphism $(\tilde V, \tilde v) \to (V, v)$
with $\tilde V$ affine is the base change of an \'etale morphism
$\tilde V_\lambda \to V_\lambda$ with $\tilde V_\lambda$ affine
for some $\lambda$, see for example
Topologies, Lemma \ref{topologies-lemma-limit-fppf-topology}.
Given $\tilde V_\lambda$ we have
$\tilde V = \lim_{\mu \geq \lambda} \tilde V_\lambda \times_{V_\lambda} V_\mu$.
Hence given $(\tilde V, \tilde v) \to (V, v)$ \'etale with $\tilde V$ affine,
we may replace $(V, v)$ by $(\tilde V, \tilde v)$ and $\xi$ by
the restriction of $\xi$ to $\tilde V$.

\medskip\noindent
Proof of surjectivity: reduce to base being affine. In particular,
suppose $\tilde S \subset S$ is an affine open subscheme such
that $v \in V$ maps to a point of $\tilde S$. Then we may according
to the previous paragraph, replace $V$ by $\tilde V = \tilde S \times_S V$.
Of course, if we do this, it suffices to solve the problem
for the functor $F$ restricted to the category of locally Noetherian
schemes over $\tilde S$. This functor is of course the functor
associated to the whole situation base changed to $\tilde S$.
Thus we may and do assume $S = \Spec(R)$ is a Noetherian affine scheme
for the rest of the proof.

\medskip\noindent
Proof of surjectivity: easy case.
If $v \in V \setminus Z$, then we can take $\tilde V = V \setminus Z$.
This descends to an open subscheme $\tilde V_\lambda \subset V_\lambda$
for some $\lambda$ by Limits, Lemma
\ref{limits-lemma-descend-opens}.
Next, after increasing $\lambda$ we may assume
there is a morphism $u'_\lambda : \tilde V_\lambda \to U'$
restricting to $u'$. Taking
$\tilde \xi_\lambda = (\emptyset, u'_\lambda, \emptyset)$
gives the desired element of $F(\tilde V_\lambda)$.

\medskip\noindent
Proof of surjectivity: hard case and reduction to affine $W$.
The most difficult case comes from considering $v \in Z \subset V$.
We claim that we can reduce this to the case where $W$ is an
affine formal scheme; we urge the reader to skip this argument\footnote{Artin's
approach to the proof of this lemma is to work around this and
consequently he can avoid proving the injectivity first. Namely, Artin
consistently works with a finite affine \'etale coverings of all spaces
in sight keeping track of the maps between them during the proof.
In hindsight that might be preferable to what we do here.}.
Namely, we can choose an \'etale morphism
$\tilde W \to W$ where $\tilde W$ is an affine formal algebraic space
such that the image of $v$ by $\hat x : V_{/Z} \to W$ is
in the image of $\tilde W \to W$ (on reductions).
Then the morphisms
$$
p : \tilde W \times_{W, g} X'_{/T'} \longrightarrow X'_{/T'}
$$
and
$$
q : \tilde W \times_{W, \hat x} V_{/Z} \to V_{/Z}
$$
are \'etale morphisms of locally Noetherian formal algebraic spaces.
By (an easy case of) Algebraization of Formal Spaces, Theorem
\ref{restricted-theorem-dilatations-general}
there exists a morphism $\tilde X' \to X'$ of algebraic spaces
which is locally of finite type, is an isomorphism over $U'$, and
such that $\tilde X'_{/T'} \to X'_{/T'}$ is isomorphic to $p$.
By Algebraization of Formal Spaces, Lemma \ref{restricted-lemma-output-etale}
the morphism $\tilde X' \to X'$ is \'etale. Denote
$\tilde T' \subset |\tilde X'|$ the inverse image of $T'$.
Denote $\tilde U' \subset \tilde X'$ the complementary open subspace.
Denote $\tilde g' : \tilde X'_{/\tilde T'} \to \tilde W$
the formal modification which is the base change of $g$ by
$\tilde W \to W$. Then we see that
$$
\tilde X',\ \tilde T',\ \tilde U',\ \tilde W,
\ \tilde g : \tilde X'_{/\tilde T'} \to \tilde W
$$
is another example of Situation \ref{situation-contractions}.
Denote $\tilde F$ the functor constructed from this triple.
There is a transformation of functors
$$
\tilde F \longrightarrow F
$$
constructed using the morphisms $\tilde X' \to X'$ and
$\tilde W \to W$ in the obvious manner; details omitted.

\medskip\noindent
Proof of surjectivity: hard case and reduction to affine $W$, part 2.
By the same theorem as used above, there exists a morphism
$\tilde V \to V$ of algebraic spaces which is locally of finite type,
is an isomorphism over $V \setminus Z$ and such that
$\tilde V_{/Z} \to V_{/Z}$ is isomorphic to $q$.
Denote $\tilde Z \subset \tilde V$ the inverse image of $Z$.
By Algebraization of Formal Spaces, Lemmas
\ref{restricted-lemma-output-etale} and \ref{restricted-lemma-output-separated}
the morphism $\tilde V \to V$ is \'etale and separated.
In particular $\tilde V$ is a (locally Noetherian) scheme, see for example
Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-locally-quasi-finite-separated-over-scheme}.
We have the morphism $u'$ which we may view as a morphism
$$
\tilde u' : \tilde V \setminus \tilde Z \longrightarrow \tilde U'
$$
where $\tilde U' \subset \tilde X'$ is the open mapping isomorphically
to $U'$. We have a morphism
$$
\tilde {\hat x} :
\tilde V_{/\tilde Z} = \tilde W \times_{W, \hat x} V_{/Z}
\longrightarrow
\tilde W
$$
Namely, here we just use the projection. Thus we have the triple
$$
\tilde \xi = (\tilde Z, \tilde u', \tilde {\hat x}) \in \tilde F(\tilde V)
$$
We omit proving the compatibility condition; hints: if $V' \to V$, $\hat x'$,
and $x'$ witness the compatibility between $u'$ and $\hat x$, then one
sets $\tilde V' = V' \times_V \tilde V$ which comes with morphsms
$\tilde{\hat x}'$ and $\tilde x'$ and show this works.
The image of $\tilde \xi$ under the transformation $\tilde F \to F$
is the restriction of $\xi$ to $\tilde V$.

\medskip\noindent
Proof of surjectivity: hard case and reduction to affine $W$, part 3.
By our choice of $\tilde W \to W$, there is an affine open
$\tilde V_{open} \subset \tilde V$ (we're running out of notation)
whose image in $V$ contains our chosen point $v \in V$.
Now by the case studied in the next paragraph and the remarks made
earlier, we can descend $\tilde \xi|_{\tilde V_{open}}$
to some element $\tilde \xi_\lambda$ of $\tilde F$ over
$\tilde V_{\lambda, open}$
for some \'etale morphism $\tilde V_{\lambda, open} \to V_\lambda$
whose base change to $V$ is $\tilde V_{open}$.
Applying the transformation of functors $\tilde F \to F$
we obtain the element of $F(\tilde V_{\lambda, open})$
we were looking for. This reduces us to the case discussed
in the next paragraph.

\medskip\noindent
Proof of surjectivity: the case of an affine $W$. We have $v \in Z \subset V$
and $W$ is an affine formal algebraic space. Recall that
$$
\xi = (Z, u', \hat x) \in F(V)
$$
We may still replace $V$ by an \'etale neighbourhood of $v$.
In particular we may and do assume $V$ and $V_\lambda$ are affine.

\medskip\noindent
Proof of surjectivity: descending $Z$. We can find a $\lambda$
and a closed subscheme $Z_\lambda \subset V_\lambda$ such that
$Z$ is the base change of $Z_\lambda$ to $V$. See
Limits, Lemma \ref{limits-lemma-descend-finite-presentation}.
Warning: we don't know (and in general it won't be true)
that $Z_\lambda$ is a reduced closed subscheme of $V_\lambda$.
For $\mu \geq \lambda$ denote $Z_\mu \subset V_\mu$ the scheme theoretic
inverse image in $V_\mu$. We will use below that
$Z = \lim_{\mu \geq \lambda} Z_\mu$ as schemes.

\medskip\noindent
Proof of surjectivity: descending $u'$.
Since $U'$ is locally of finite type over $S$
we may assume after increasing $\lambda$
that there exists a morphism
$u'_\lambda : V_\lambda \setminus Z_\lambda \to U'$
whose restriction to $V \setminus Z$ is $u'$.
See Limits, Proposition
\ref{limits-proposition-characterize-locally-finite-presentation}.
For $\mu \geq \lambda$ we will denote $u'_\mu$ the restriction
of $u'_\lambda$ to $V_\mu \setminus Z_\mu$.

\medskip\noindent
Proof of surjectivity: descending a witness.
Let $V' \to V$, $\hat x'$, and $x'$ witness the compatibility between
$u'$ and $\hat x$. Using the same references as above we may assume
(after increasing $\lambda$) that there exists a morphism
$V'_\lambda \to V_\lambda$ of finite type whose base change to $V$
is $V' \to V$. After increasing $\lambda$ we may assume
$V'_\lambda \to V_\lambda$ is proper
(Limits, Lemma \ref{limits-lemma-eventually-proper}).
Next, we may assume $V'_\lambda \to V_\lambda$ is an isomorphism
over $V_\lambda \setminus Z_\lambda$
(Limits, Lemma \ref{limits-lemma-descend-isomorphism}).
Next, we may assume there is a morphism $x'_\lambda : V'_\lambda \to X'$
whose restriction to $V'$ is $x'$.
Increasing $\lambda$ again we may assume $x'_\lambda$
agrees with $u'_\lambda$ over $V_\lambda \setminus Z_\lambda$.
For $\mu \geq \lambda$ we denote
$V'_\mu$ and $x'_\mu$ the base change of $V'_\lambda$ and the
restriction of $x'_\lambda$.

\medskip\noindent
Proof of surjectivity: algebra.
Write $W = \text{Spf}(B)$, $V = \Spec(A)$, and
for $\mu \geq \lambda$ write $V_\mu = \Spec(A_\mu)$.
Denote $I_\mu \subset A_\mu$ and $I \subset A$
the ideals cutting out $Z_\mu$ and $Z$.
Then $I_\lambda A_\mu = I_\mu$ and $I_\lambda A = I$.
The morphism $\hat x$ determines and is determined by a
continuous ring map
$$
(\hat x)^\sharp : B \longrightarrow A^\wedge
$$
where $A^\wedge$ is the $I$-adic completion of $A$.
To finish the proof we have to show that this map descends to a map into
$A_\mu^\wedge$ for some sufficiently large $\mu$ where $A_\mu^\wedge$
is the $I_\mu$-adic completion of $A_\mu$.
This is a nontrivial fact; Artin writes in his paper
\cite{ArtinII}: ``Since the data (3.5) involve $I$-adic completions,
which do not commute with direct limits, the verification is somewhat
delicate. It is an algebraic analogue of a convergence proof in analysis.''

\medskip\noindent
Proof of surjectivity: algebra, more rings.
Let us denote
$$
C_\mu = \Gamma(V'_\mu, \mathcal{O})
\quad\text{and}\quad
C = \Gamma(V', \mathcal{O})
$$
Observe that $A \to C$ and $A_\mu \to C_\mu$ are finite ring maps as
$V' \to V$ and $V'_\mu \to V_\mu$ are proper morphisms, see
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-over-affine-cohomology-finite}.
Since $V = \lim V_\mu$ and $V' = \lim V'_\mu$
we have
$$
A = \colim A_\mu
\quad\text{and}\quad
C = \colim C_\mu
$$
by Limits, Lemma \ref{limits-lemma-descend-section}\footnote{We don't
know that $C_\mu = C_\lambda \otimes_{A_\lambda} A_\mu$ as the
various morphisms aren't flat.}. For an element
$a \in I$, resp.\ $a \in I_\mu$ the maps $A_a \to C_a$,
resp.\ $(A_\mu)_a \to (C_\mu)_a$ are isomorphisms by flat base change
(Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-flat-base-change-cohomology}).
Hence the kernel and cokernel of $A \to C$ is supported
on $V(I)$ and similarly for $A_\mu \to C_\mu$.
We conclude the kernel and cokernel of $A \to C$
are annihilated by a power of $I$ and the kernel and cokernel of
$A_\mu \to C_\mu$ are annihilated by a power of $I_\mu$, see
Algebra, Lemma \ref{algebra-lemma-Noetherian-power-ideal-kills-module}.

\medskip\noindent
Proof of surjectivity: algebra, more ring maps.
Denote $Z_n \subset V$ the $n$th infinitesimal
neighbourhood of $Z$ and denote $Z_{\mu, n} \subset V_\mu$
the $n$th infinitesimal neighbourhood of $Z_\mu$.
By the theorem on formal functions
(Cohomology of Spaces, Theorem
\ref{spaces-cohomology-theorem-formal-functions})
we have
$$
C^\wedge = \lim_n H^0(V' \times_V Z_n, \mathcal{O})
\quad\text{and}\quad
C_\mu^\wedge =
\lim_n H^0(V'_\mu \times_{V_\mu} Z_{\mu, n}, \mathcal{O})
$$
where $C^\wedge$ and $C_\mu^\wedge$ are the completion with
respect to $I$ and $I_\mu$.
Combining the completion of the morphism
$x'_\mu : V'_\mu \to X'$ with the morphism $g : X'_{/T'} \to W$ we obtain
$$
g \circ x'_{\mu, /Z_\mu} :
V'_{\mu, /Z_\mu} = \colim V_\mu' \times_{V_\mu} Z_{\mu, n}
\longrightarrow
W
$$
and hence by the description of the completion
$C_\mu^\wedge$ above we obtain a continuous ring homomorphism
$$
(g \circ x'_{\mu, /Z_\mu})^\sharp : B \longrightarrow C_\mu^\wedge
$$
The fact that $V' \to V$, $\hat x'$, $x'$ witnesses the compatibility
between $u'$ and $\hat x$ implies the
commutativity of the following diagram
$$
\xymatrix{
C_\mu^\wedge \ar[r] &
C^\wedge \\
B \ar[u]^{(g \circ x'_{\mu, /Z_\mu})^\sharp} \ar[r]^{(\hat x)^\sharp} &
A^\wedge \ar[u]
}
$$

\medskip\noindent
Proof of surjectivity: more algebra arguments. Recall that the finite
$A$-modules $\Ker(A \to C)$ and $\Coker(A \to C)$ are annihilated
by a power of $I$ and similarly the finite $A_\mu$-modules
$\Ker(A_\mu \to C_\mu)$ and $\Coker(A_\mu \to C_\mu)$ are annihilated
by a power of $I_\mu$. This implies that these modules are
equal to their completions. Since $I$-adic completion on the category of
finite $A$-modules is exact (see
Algebra, Section \ref{algebra-section-completion-noetherian})
it follows that we have
$$
\Coker(A^\wedge \to C^\wedge) = \Coker(A \to C)
$$
and similarly for kernels and for the maps $A_\mu \to C_\mu$.
Of course we also have
$$
\Ker(A \to C) = \colim \Ker(A_\mu \to C_\mu)
\quad\text{and}\quad
\Coker(A \to C) = \colim \Coker(A_\mu \to C_\mu)
$$
Recall that $S = \Spec(R)$ is affine. All of the ring maps
above are $R$-algebra homomorphisms as all of the morphisms
are morphisms over $S$. By
Algebraization of Formal Spaces, Lemma
\ref{restricted-lemma-Noetherian-finite-type-red}
we see that $B$ is topologically of finite type over $R$.
Say $B$ is topologically generated by $b_1, \ldots, b_n$.
Pick some $\mu$ (for example $\lambda$) and consider
the elements
$$
\text{images of }
(g \circ x'_{\mu, /Z_\mu})^\sharp(b_1)
, \ldots,
(g \circ x'_{\mu, /Z_\mu})^\sharp(b_n)
\text{ in }\Coker(A_\mu \to C_\mu)
$$
The image of these elements in $\Coker(\alpha)$ are zero
by the commutativity of the square above. Since
$\Coker(A \to C) = \colim \Coker(A_\mu \to C_\mu)$ and these
cokernels are equal to their completions
we see that after increasing $\mu$ we may assume these
images are all zero. This means that the continuous
homomorphism $(g \circ x'_{\mu, /Z_\mu})^\sharp$ has image contained
in $\Im(A_\mu \to C_\mu)$.
Choose elements $a_{\mu, j} \in (A_\mu)^\wedge$ mapping to
$(g \circ x'_{\mu, /Z_\mu})^\sharp(b_1)$ in $(C_\mu)^\wedge$.
Then $a_{\mu, j} \in A_\mu^\wedge$ and $(\hat x)^\sharp(b_j) \in A^\wedge$
map to the same element of $C^\wedge$ by the commutativity of the
square above. Since
$\Ker(A \to C) = \colim \Ker(A_\mu \to C_\mu)$ and these kernels
are equal to their completions, we may after increasing
$\mu$ adjust our choices of $a_{\mu, j}$ such that
the image of $a_{\mu, j}$ in $A^\wedge$ is equal to $(\hat x)^\sharp(b_j)$.

\medskip\noindent
Proof of surjectivity: final algebra arguments.
Let $\mathfrak b \subset B$ be the ideal of topologically nilpotent
elements. Let $J \subset R[x_1, \ldots, x_n]$ be the ideal
consisting of those $h(x_1, \ldots, x_n)$ such that
$h(b_1, \ldots, b_n) \in \mathfrak b$. Then we get a continuous
surjection of topological $R$-algebras
$$
\Phi : R[x_1, \ldots, x_n]^\wedge \longrightarrow B,\quad
x_j \longmapsto b_j
$$
where the completion on the left hand side is with respect to $J$.
Since $R[x_1, \ldots, x_n]$ is Noetherian we can choose
generators $h_1, \ldots, h_m$ for $J$. By the commutativity
of the square above we see that $h_j(a_{\mu, 1}, \ldots, a_{\mu, n})$ is
an element of $A_\mu^\wedge$ whose image in $A^\wedge$ is contained
in $IA^\wedge$. Namely, the ring map $(\hat x)^\sharp$ is continuous
and $IA^\wedge$ is the ideal of topological nilpotent elements
of $A^\wedge$ because $A^\wedge/IA^\wedge = A/I$ is reduced.
(See Algebra, Section \ref{algebra-section-completion-noetherian}
for results on completion in Noetherian rings.)
Since $A/I = \colim A_\mu/I_\mu$ we conclude that after increasing
$\mu$ we may assume $h_j(a_{\mu, 1}, \ldots, a_{\mu, n})$ is in
$I_\mu A_\mu^\wedge$. In particular the elements
$h_j(a_{\mu, 1}, \ldots, a_{\mu, n})$ of $A_\mu^\wedge$
are topologically nilpotent in $A_\mu^\wedge$.
Thus we obtain a continuous $R$-algebra homomorphism
$$
\Psi : R[x_1, \ldots, x_n]^\wedge \longrightarrow A_\mu^\wedge,\quad
x_j \longmapsto a_{\mu, j}
$$
In order to conclude what we want, we need to see if $\Ker(\Phi)$ is
annihilated by $\Psi$. This may not be true, but we can achieve
this after increasing $\mu$. Indeed, since
$R[x_1, \ldots, x_n]^\wedge$ is Noetherian,
we can choose generators $g_1, \ldots, g_l$ of the ideal
$\Ker(\Phi)$. Then we see that
$$
\Psi(g_1), \ldots, \Psi(g_l) \in
\Ker(A_\mu^\wedge \to C_\mu^\wedge) = \Ker(A_\mu \to C_\mu)
$$
map to zero in $\Ker(A \to C) = \colim \Ker(A_\mu \to C_\mu)$.
Hence increasing $\mu$ as before we get the desired result.

\medskip\noindent
Proof of surjectivity: mopping up. The continuous ring homomorphism
$B \to (A_\mu)^\wedge$ constructed above determines a morphism
$\hat x_\mu : V_{\mu, /Z_\mu} \to W$.
The compatibility of $\hat x_\mu$ and $u'_\mu$ follows
from the fact that the ring map $B \to (A_\mu)^\wedge$
is by construction compatible with the ring map $A_\mu \to C_\mu$.
In fact, the compatibility will be witnessed by the proper morphism
$V'_\mu \to V_\mu$ and the morphisms
$x'_\mu$ and $\hat x'_\mu = x'_{\mu, /Z_\mu}$ we used in
the construction. This finishes the proof.
\end{proof}

\begin{lemma}
\label{lemma-rs}
In Situation \ref{situation-contractions} the functor $F$ satisfies
the Rim-Schlessinger condition (RS).
\end{lemma}

\begin{proof}
Recall that the condition only involves the evaluation $F(V)$ of the functor
$F$ on schemes $V$ over $S$ which are spectra of Artinian local rings
and the restriction maps $F(V_2) \to F(V_1)$ for morphisms $V_1 \to V_2$
of schemes over $S$ which are spectra of Artinian local rings.
Thus let $V/S$ be the spetruim of an Artinian local ring.
If $\xi = (Z, u', \hat x) \in F(V)$ then either $Z = \emptyset$
or $Z = V$ (set theoretically). In the first case we see that
$\hat x$ is a morphism from the empty formal algebraic space
into $W$. In the second case we see that $u'$ is a morphism from
the empty scheme into $X'$ and we see that $\hat x : V \to W$
is a morphism into $W$. We conclude that
$$
F(V) = U'(V) \amalg W(V)
$$
and moreover for $V_1 \to V_2$ as above the induced map
$F(V_2) \to F(V_1)$ is compatible with this decomposition.
Hence it suffices to prove that both $U'$ and $W$ satisfy the
Rim-Schlessinger condition. For $U'$ this follows from
Lemma \ref{lemma-algebraic-stack-RS}.
To see that it is true for $W$, we write $W = \colim W_n$ as in
Formal Spaces, Lemma
\ref{formal-spaces-lemma-structure-locally-noetherian}.
Say $V = \Spec(A)$ with $(A, \mathfrak m)$ an Artinian local ring.
Pick $n \geq 1$ such that $\mathfrak m^n = 0$. Then we have
$W(V) = W_n(V)$. Hence we see that the Rim-Schlessinger condition
for $W$ follows from the Rim-Schlessinger condition for $W_n$ for
all $n$ (which in turn follows from
Lemma \ref{lemma-algebraic-stack-RS}).
\end{proof}

\begin{lemma}
\label{lemma-finite-dim}
In Situation \ref{situation-contractions} the tangent spaces of
the functor $F$ are finite dimensional.
\end{lemma}

\begin{proof}
In the proof of Lemma \ref{lemma-rs} we have seen that
$F(V) = U'(V) \amalg W(V)$ if $V$ is the spectrum of an Artinian
local ring. The tangent spaces are computed entirely from evaluations
of $F$ on such schemes over $S$.
Hence it suffices to prove that the tangent spaces
of the functors $U'$ and $W$ are finite dimensional.
For $U'$ this follows from
Lemma \ref{lemma-finite-dimension}.
Write $W = \colim W_n$ as in the proof of Lemma \ref{lemma-rs}.
Then we see that the tangent spaces of $W$ are equal to the
tangent spaces of $W_2$, as to get at the tangent space
we only need to evaluate $W$ on spectra of Artinian local
rings $(A, \mathfrak m)$ with $\mathfrak m^2 = 0$.
Then again we see that the tangent spaces of $W_2$ have
finite dimension by
Lemma \ref{lemma-finite-dimension}.
\end{proof}

\begin{lemma}
\label{lemma-formal-object-effective}
In Situation \ref{situation-contractions} assume $X' \to S$ is separated.
Then every formal object for $F$ is effective.
\end{lemma}

\begin{proof}
A formal object $\xi = (R, \xi_n)$ of $F$ consists of a Noetherian
complete local $S$-algebra $R$ whose residue field is of finite type
over $S$, together with elements $\xi_n \in F(\Spec(R/\mathfrak m^n))$
for all $n$ such that $\xi_{n + 1}|_{\Spec(R/\mathfrak m^n)} = \xi_n$.
By the discussion in the proof of Lemma \ref{lemma-rs}
we see that either $\xi$ is a formal object of $U'$ or a formal
object of $W$. In the first case we see that $\xi$ is effective
by Lemma \ref{lemma-effective}. The second case is the interesting case.
Set $V = \Spec(R)$. We will construct an element
$(Z, u', \hat x) \in F(V)$ whose image in $F(\Spec(R/\mathfrak m^n))$
is $\xi_n$ for all $n \geq 1$.

\medskip\noindent
We may view the collection of elements $\xi_n$ as a morphism
$$
\xi : \text{Spf}(R) \longrightarrow W
$$
of locally Noetherian formal algebraic spaces over $S$. Observe that $\xi$
is {\it not} an adic morphism in general. To fix this, let $I \subset R$
be the ideal corresponding to the formal closed subspace
$$
\text{Spf}(R) \times_{\xi, W} W_{red} \subset \text{Spf}(R)
$$
Note that $I \subset \mathfrak m_R$. Set $Z = V(I) \subset V = \Spec(R)$.
Since $R$ is $\mathfrak m_R$-adically complete it is a fortiori
$I$-adically complete (Algebra, Lemma \ref{algebra-lemma-complete-by-sub}).
Moreover, we claim that for each $n \geq 1$ the morphism
$$
\xi|_{\text{Spf}(R/I^n)} :
\text{Spf}(R/I^n)
\longrightarrow
W
$$
actually comes from a morphism
$$
\xi'_n :  \Spec(R/I^n) \longrightarrow W
$$
Namely, this follows from writing $W = \colim W_n$ as in the
proof of Lemma \ref{lemma-rs}, noticing that $\xi|_{\text{Spf}(R/I^n)}$
maps into $W_n$, and applying Formal Spaces, Lemma
\ref{formal-spaces-lemma-map-into-algebraic-space}
to algebraize this to a morphism $\Spec(R/I^n) \to W_n$
as desired. Let us denote $\text{Spf}'(R) = V_{/Z}$ the formal spectrum
of $R$ endowed with the $I$-adic topology -- equivalently the formal
completion of $V$ along $Z$. Using the morphisms
$\xi'_n$ we obtain an adic morphism
$$
\hat x = (\xi'_n) : \text{Spf}'(R) \longrightarrow W
$$
of locally Noetherian formal algebraic spaces over $S$.
Consider the base change
$$
\text{Spf}'(R) \times_{\hat x, W, g} X'_{/T'} \longrightarrow \text{Spf}'(R)
$$
This is a formal modification by
Algebraization of Formal Spaces, Lemma
\ref{restricted-lemma-base-change-formal-modification}.
Hence by the main theorem on dilatations
(Algebraization of Formal Spaces, Theorem \ref{restricted-theorem-dilatations})
we obtain a proper morphism
$$
V' \longrightarrow V = \Spec(R)
$$
which is an isomorphism over $\Spec(R) \setminus V(I)$ and
whose completion recovers the formal modification above, in other words
$$
V' \times_{\Spec(R)} \Spec(R/I^n) =
\Spec(R/I^n) \times_{\xi'_n, W, g} X'_{/T'}
$$
This in particular tells us we have a compatible system of morphisms
$$
V' \times_{\Spec(R)} \Spec(R/I^n) \longrightarrow X' \times_S \Spec(R/I^n)
$$
Hence by Grothendieck's algebraization theorem (in the form of
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-algebraize-morphism})
we obtain a morphism
$$
x' : V' \to X'
$$
over $S$ recovering the morphisms displayed above. Then finally
setting $u' : V \setminus Z \to X'$ the restriction of $x'$ to
$V \setminus Z \subset V'$ gives the third component of our
desired element $(Z, u', \hat x) \in F(V)$.
\end{proof}

\begin{lemma}
\label{lemma-openness-smoothness}
Let $S$ be a locally Noetherian scheme. Let $V$ be a scheme locally
of finite type over $S$. Let $Z \subset V$ be closed. Let $W$ be
a locally Noetherian formal algebraic space over $S$ such that
$W_{red}$ is locally of finite type over $S$. Let $g : V_{/Z} \to W$
be an adic morphism of formal algebraic spaces over $S$. Let $v \in V$
be a closed point such that $g$ is versal at $v$ (as in
Section \ref{section-axioms-functors}).
Then after replacing $V$ by an open neighbourhood of $v$ the
morphism $g$ is smooth (see proof).
\end{lemma}

\begin{proof}
Since $g$ is adic it is representable by algebraic spaces (Formal Spaces,
Section \ref{formal-spaces-section-adic}).
Thus by saying $g$ is smooth we mean that $g$ should be smooth
in the sense of
Bootstrap, Definition \ref{bootstrap-definition-property-transformation}.

\medskip\noindent
Write $W = \colim W_n$ as in Formal Spaces, Lemma
\ref{formal-spaces-lemma-structure-locally-noetherian}.
Set $V_n = V_{/Z} \times_{\hat x, W} W_n$.
Then $V_n$ is a closed subscheme with underlying set $Z$.
Smoothness of $V \to W$ is equivalent to the smoothness
of all the morphisms $V_n \to W_n$ (this holds because any morphism
$T \to W$ with $T$ a quasi-compact scheme factors through
$W_n$ for some $n$). We know that the morphism $V_n \to W_n$
is smooth at $v$ by
Lemma \ref{lemma-base-change-versal}\footnote{The lemma applies since
the diagonal of $W$ is representable by algebraic spaces and
locally of finite type, see Formal Spaces, Lemma
\ref{formal-spaces-lemma-diagonal-morphism-formal-algebraic-spaces}
and we have seen that $W$ has (RS) in the proof of Lemma \ref{lemma-rs}.}.
Of course this means that given any $n$ we can shrink $V$
such that $V_n \to W_n$ is smooth. The problem is to find
an open which works for all $n$ at the same time.

\medskip\noindent
The question is local on $V$, hence we may assume $S = \Spec(R)$ and
$V = \Spec(A)$ are affine.

\medskip\noindent
In this paragraph we reduce to the case where $W$ is an affine formal
algebraic space. Choose an affine formal scheme $W'$ and an \'etale morphism
$W' \to W$ such that the image of $v$ in $W_{red}$ is in the
image of $W'_{red} \to W_{red}$. Then $V_{/Z} \times_{g, W} W' \to V_{/Z}$
is an adic \'etale morphism of formal algebraic spaces over $S$
and $V_{/Z} \times_{g, W} W'$ is an affine formal algebraic space.
By Algebraization of Formal Spaces,
Lemma \ref{restricted-lemma-algebraize-rig-etale-affine}
there exists an \'etale morphism $\varphi : V' \to V$ of affine schemes
such that the completion of $V'$ along $Z' = \varphi^{-1}(Z)$
is isomorphic to $V_{/Z} \times_{g, W} W'$ over $V_{/Z}$.
Observe that $v$ is the image of some $v' \in V'$.
Since smoothness is preserved under base change we see that
$V'_n \to W'_n$ is smooth for all $n$. In the next paragraph
we show that after replacing $V'$ by an open neighbourhood of $v'$
the morphisms $V'_n \to W'_n$ are smooth for all $n$.
Then, after we replace $V$ by the open image of $V' \to V$,
we obtain that $V_n \to W_n$ is smooth by \'etale descent of smoothness.
Some details omitted.

\medskip\noindent
Assume $S = \Spec(R)$, $V = \Spec(A)$, $Z = V(I)$, and $W = \text{Spf}(B)$.
Let $v$ correspond to the maximal ideal $I \subset \mathfrak m \subset A$.
We are given an adic continuous $R$-algebra homomorphism
$$
B \longrightarrow A^\wedge
$$
Let $\mathfrak b \subset B$ be the ideal of topologically nilpotent
elements (this is the maximal ideal of definition of the Noetherian adic
topological ring $B$). Observe that $\mathfrak b A^\wedge$ and
$IA^\wedge$ are both ideals of definition of the Noetherian adic
ring $A^\wedge$. Also, $\mathfrak m A^\wedge$ is a maximal ideal
of $A^\wedge$ containing both $\mathfrak b A^\wedge$ and $IA^\wedge$.
We are given that
$$
B_n = B/\mathfrak b^n \to A^\wedge/\mathfrak b^n A^\wedge = A_n
$$
is smooth at $\mathfrak m$ for all $n$. By the discussion above
we may and do assume that $B_1 \to A_1$ is a smooth ring map.
Denote $\mathfrak m_1 \subset A_1$ the maximal ideal corresponding
to $\mathfrak m$. Since smoothness implies flatness, we see that:
for all $n \geq 1$ the map
$$
\mathfrak b^n/\mathfrak b^{n + 1} \otimes_{B_1} (A_1)_{\mathfrak m_1}
\longrightarrow
\left(\mathfrak b^nA^\wedge/\mathfrak b^{n + 1}A^\wedge\right)_{\mathfrak m_1}
$$
is an isomorphism (see
Algebra, Lemma \ref{algebra-lemma-what-does-it-mean-again}).
Consider the Rees algebra
$$
B' = \bigoplus\nolimits_{n \geq 0} \mathfrak b^n/\mathfrak b^{n + 1}
$$
which is a finite type graded algebra over the Noetherian ring $B_1$ and
the Rees algebra
$$
A' = \bigoplus\nolimits_{n \geq 0}
\mathfrak b^nA^\wedge/\mathfrak b^{n + 1}A^\wedge
$$
which is a a finite type graded algebra over the Noetherian ring $A_1$.
Consider the homomorphism of graded $A_1$-algebras
$$
\Psi : B' \otimes_{B_1} A_1 \longrightarrow A'
$$
By the above this map is an isomorphism after localizing at
the maximal ideal $\mathfrak m_1$ of $A_1$.
Hence $\Ker(\Psi)$, resp.\ $\Coker(\Psi)$ is a finite module
over $B' \otimes_{B_1} A_1$, resp.\ $A'$ whose localization
at $\mathfrak m_1$ is zero. It follows that after replacing
$A_1$ (and correspondingly $A$) by a principal localization
we may assume $\Psi$ is an isomorphism. (This is the key step of the proof.)
Then working backwards we see that $B_n \to A_n$ is flat, see
Algebra, Lemma \ref{algebra-lemma-what-does-it-mean-again}.
Hence $A_n \to B_n$ is smooth (as a flat ring map with smooth
fibres, see Algebra, Lemma \ref{algebra-lemma-flat-fibre-smooth})
and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-openness-versality}
In Situation \ref{situation-contractions} the functor
$F$ satisfies openness of versality.
\end{lemma}

\begin{proof}
We have to show the following. Given a scheme $V$ locally of finite type over
$S$, given $\xi \in F(V)$, and given a finite type point $v_0 \in V$ such that
$\xi$ is versal at $v_0$, after replacing $V$ by an open neighbourhood
of $v_0$ we have that $\xi$ is versal at every finite type point of $V$.
Write $\xi = (Z, u', \hat x)$.

\medskip\noindent
First case: $v_0 \not \in Z$. Then we can first replace $V$ by
$V \setminus Z$. Hence we see that $\xi = (\emptyset, u', \emptyset)$
and the morphism $u' : V \to X'$ is versal at $v_0$.
By More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-lifting-along-artinian-at-point}
this means that $u' : V \to X'$ is smooth at $v_0$.
Since the set of a points where a morphism is smooth is open,
we can after shrinking $V$ assume $u'$ is smooth.
Then the same lemma tells us that $\xi$ is versal at every
point as desired.

\medskip\noindent
Second case: $v_0 \in Z$. Write $W = \colim W_n$ as in
Formal Spaces, Lemma \ref{formal-spaces-lemma-structure-locally-noetherian}.
By Lemma \ref{lemma-openness-smoothness} we may assume $\hat x : V_{/Z} \to W$
is a smooth morphism of formal algebraic spaces. It follows immediately
that $\xi = (Z, u', \hat x)$ is versal at all finite type points of $Z$.
Let $V' \to V$, $\hat x'$, and $x'$ witness the compatibility between $u'$
and $\hat x$. We see that $\hat x' : V'_{/Z} \to X'_{/T'}$ is smooth as a
base change of $\hat x$. Since $\hat x'$ is the completion of
$x' : V' \to X'$ this implies that $x' : V' \to X'$ is smooth at all
points of $(V' \to V)^{-1}(Z) = |x'|^{-1}(T') \subset |V'|$
by the already used More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-lifting-along-artinian-at-point}.
Since the set of smooth points of a morphism is open, we see that
the closed set of points $B \subset |V'|$ where $x'$ is not smooth
does not meet $(V' \to V)^{-1}(Z)$. Since $V' \to V$ is proper and
hence closed, we see that $(V' \to V)(B) \subset V$ is a closed
subset not meeting $Z$. Hence after shrinking $V$ we may assume
$B = \emptyset$, i.e., $x'$ is smooth. By the discussion in the previous
paragraph this exactly means that $\xi$ is versal at all finite type
points of $V$ not contained in $Z$ and the proof is complete.
\end{proof}

\noindent
Here is the final result.

\begin{theorem}
\label{theorem-contractions}
\begin{reference}
\cite[Theorem 3.1]{ArtinII}
\end{reference}
Let $S$ be a locally Noetherian scheme such that $\mathcal{O}_{S, s}$
is a G-ring for all finite type points $s \in S$. Let $X'$ be an algebraic
space locally of finite type over $S$. Let $T' \subset |X'|$ be a closed
subset. Let $W$ be a locally Noetherian formal algebraic space over $S$
with $W_{red}$ locally of finite type over $S$. Finally, we let
$$
g : X'_{/T'} \longrightarrow W
$$
be a formal modification, see Algebraization of Formal Spaces, Definition
\ref{restricted-definition-formal-modification}. If $X'$ and $W$ are
separated\footnote{See Remark \ref{remark-separated-needed}.} over $S$, then
there exists a proper morphism $f : X' \to X$ of algebraic spaces over $S$,
a closed subset $T \subset |X|$, and an isomorphism $a : X_{/T} \to W$
of formal algebraic spaces such that
\begin{enumerate}
\item $T'$ is the inverse image of $T$ by $|f| : |X'| \to |X|$,
\item $f : X' \to X$ maps $X' \setminus T'$ isomorphically to
$X \setminus T$, and
\item $g = a \circ f_{/T}$ where $f_{/T} : X'_{/T'} \to X_{/T}$
is the induced morphism.
\end{enumerate}
In other words, $(f : X' \to X, T, a)$ is a solution as defined earlier in
this section.
\end{theorem}

\begin{proof}
Let $F$ be the functor constructed using $X'$, $T'$, $W$, $g$ in this section.
By Lemma \ref{lemma-functor-is-solution} it suffices to show that
$F$ corresponds to an algebraic space $X$ locally of finite type over $S$.
In order to do this, we will apply
Proposition \ref{proposition-spaces-diagonal-representable-noetherian}.
Namely, by Lemma \ref{lemma-diagonal-contractions}
the diagonal of $F$ is representable by closed immersions
and by
Lemmas \ref{lemma-sheaf}, \ref{lemma-limit-preserving},
\ref{lemma-rs}, \ref{lemma-finite-dim},
\ref{lemma-formal-object-effective}, and \ref{lemma-openness-versality}
we have axioms [0], [1], [2], [3], [4], and [5].
\end{proof}

\begin{remark}
\label{remark-separated-needed}
The proof of Theorem \ref{theorem-contractions} uses that $X'$ and $W$
are separated over $S$ in two places. First, the proof uses this in showing
$\Delta : F \to F \times F$ is representable by algebraic spaces.
This use of the assumption can be entirely avoided by proving
that $\Delta$ is representable by applying the theorem in the
separated case to the triples
$E'$, $(E' \to V)^{-1}Z$, and $E'_{/Z} \to E_W$
found in Remark \ref{remark-diagonal} (this is the usual bootstrap
procedure for the diagonal). Thus the proof of
Lemma \ref{lemma-formal-object-effective} is the only
place in our proof of Theorem \ref{theorem-contractions}
where we really need to use that $X' \to S$ is separated.
The reader checks that we use the assumption only to obtain
the morphism $x' : V' \to X'$. The existence of $x'$ can be shown,
using results in the literature, if $X' \to S$ is quasi-separated, see
More on Morphisms of Spaces, Remark
\ref{spaces-more-morphisms-remark-weaken-separation-axioms-question}.
We conclude the theorem holds as stated with
``separated'' replaced by ``quasi-separated''. If we ever need this
we will precisely state and carefully prove this here.
\end{remark}















\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
